Subject: Re: [PATCH] fast-import: use hashcmp() for SHA1 hash comparison

From: Jeff King <[email-masked]>
Date: Fri, 18 Jul 2014 19:57:08 -0400

On Fri, Jul 18, 2014 at 09:14:05PM +0200, René Scharfe wrote:

> If inlining is really better is another matter; I don't understand how
> 1a812f3a (hashcmp(): inline memcmp() by hand to optimize) could have made
> git gc 18% faster, as it claimed.  I would expect memcmp(), which can
> compare more than a byte at a time, to be significantly faster -- or at
> least just as fast as whatever the compiler does with the inlined version.

I looked into this a while ago[1]. I think with glibc 2.13 and up, the
memcmp is a win. We should consider switching back if that is what is
common now.

-Peff

[1] http://article.gmane.org/gmane.comp.version-control.git/218396