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

Re: [PATCH v2] cache.h: eliminate SHA-1 deprecation warnings on OS X 10.8

From
Jeff King <peff@peff.net>
Date
May 11, 2013, 08:45 UTC
Message-ID
<20130511084543.GA1905@sigill.intra.peff.net>
In-Reply-To
<CAJDDKr7-sMrX=2Aek1LY8knM2jFPs933eLj3iZdTa68YYv-6Og@mail.gmail.com>
On Sat, May 11, 2013 at 01:38:32AM -0700, David Aguilar wrote:
Show 14 quoted lines
> > Adding "--verify-objects" would sha1 the blobs, too, which might be more
> > reasonable (or running "git fsck"). Something like "git add" on a large
> > blob would also be a good test.
> 
> Thanks.  Here are the numbers with --verify-objects:
> 
> $ time git rev-list --all --objects --verify-objects >/dev/null
> 
> # CommonCrypto 32.24s user 4.65s system 99% cpu 37.098 total
> # master       33.00s user 4.68s system 99% cpu 37.852 total
> # BLK_SHA1     54.17s user 4.67s system 99% cpu 58.928 total
> 
> Doing BLK_SHA1 seems like less of a good idea now, so I think my
> latest re-roll might be the way to go...

Wow, that's really terrible. What level of optimization do you compile with? With the other implementations, you are calling into (presumably) optimized library code, but with BLK_SHA1 you are getting whatever you just compiled.

Here are three timings that show how big a difference that can make:
  openssl,  -O0    0m21.152s
  BLK_SHA1, -O0    0m31.920s
  BLK_SHA1, -O3    0m19.652s

So it is a win over openssl with optimizations on, but a pretty big loss otherwise.

-Peff
Previous: David AguilarNext: David Aguilar
Message 6 of 8 in “cache.h: eliminate SHA-1 deprecation warnings on OS X 10.8”
  1. cache.h: eliminate SHA-1 deprecation warnings on OS X 10.8David Aguilar, May 11, 2013
  2. Jonathan NiederMay 11, 2013
  3. David AguilarMay 11, 2013
  4. Jeff KingMay 11, 2013
  5. David AguilarMay 11, 2013
  6. Jeff KingMay 11, 2013
  7. David AguilarMay 11, 2013
  8. Jeff KingMay 11, 2013

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.