git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Nicolas PitreNext: Junio C Hamano
Message 2 of 4 in “make the new block-sha1 the default”
  1. make the new block-sha1 the defaultNicolas Pitre, Aug 25, 2009
  2. Jeff KingAug 25, 2009
  3. Junio C HamanoAug 25, 2009
  4. Nicolas PitreAug 25, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.