Re: [PATCH/RFC] make the new block-sha1 the default
- From
Jeff King <peff@peff.net>
- Date
- Aug 25, 2009, 04:18 UTC
- Message-ID
- <20090825041859.GA10033@coredump.intra.peff.net>
- In-Reply-To
- <alpine.LFD.2.00.0908242249420.6044@xanadu.home>
On Mon, Aug 24, 2009 at 11:04:37PM -0400, Nicolas Pitre wrote:
> ... and remove support for linking against the openssl SHA1 code. > > The block-sha1 implementation is not significantly worse and sometimes > even faster than the openssl SHA1 implementation. This allows for
Is there a reason not to leave the option of linking against openssl?
I'm still getting better numbers for OpenSSL over block-sha1 when doing "git fsck --full" in some repos. Particularly those with large files and few deltas, where the time is heavily influenced by sha-1 performance. I'm seeing up to 20% speed improvement using OpenSSL on those repos, and about 8% on linux-2.6 (the processor is a Conroe Core 2, git compiled with -O2).
But what really kills me is that I usually compile git with '-O0' because I am often investigating bugs and I like the debugger to act sanely. The performance hit is usually not noticeable, but in this case it is: my "git fsck --full" times jump from ~8.2s (OpenSSL) and ~10.3s (block-sha1, -O2) to ~18.2s (block-sha1, -O0).
Certainly you can argue that it is idiotic to benchmark anything at -O0. But right now, it is perfectly reasonable to compile git with -O0 and assume OpenSSL is compiled with sane optimizations. I'd rather not take that away without a good reason.
-Peff