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

Re: [PATCH] mingw: use OpenSSL's SHA-1 routines

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 10, 2017, 15:49 UTC
Message-ID
<alpine.DEB.2.20.1702101647340.3496@virtualbox>
In-Reply-To
<20170210050237.gajicliueuvk6s5d@sigill.intra.peff.net>
Hi Peff,
On Fri, 10 Feb 2017, Jeff King wrote:
Show 28 quoted lines
> On Thu, Feb 09, 2017 at 11:27:49PM +0100, Johannes Schindelin wrote:
> 
> > From: Jeff Hostetler <jeffhost@microsoft.com>
> > 
> > Use OpenSSL's SHA-1 routines rather than builtin block-sha1 routines.
> > This improves performance on SHA1 operations on Intel processors.
> > 
> > OpenSSL 1.0.2 has made considerable performance improvements and
> > support the Intel hardware acceleration features.  See:
> > https://software.intel.com/en-us/articles/improving-openssl-performance
> > https://software.intel.com/en-us/articles/intel-sha-extensions
> > 
> > To test this I added/staged a single file in a gigantic repository
> > having a 450MB index file.  The code in read-cache.c verifies the
> > header SHA as it reads the index and computes a new header SHA as it
> > writes out the new index.  Therefore, in this test the SHA code must
> > process 900MB of data.  Testing was done on an Intel I7-4770 CPU @
> > 3.40GHz (Intel64, Family 6, Model 60) CPU.
> 
> I think this is only half the story. A heavy-sha1 workload is faster,
> which is good. But one of the original reasons to prefer blk-sha1 (at
> least on Linux) is that resolving libcrypto.so symbols takes a
> non-trivial amount of time. I just timed it again, and it seems to be
> consistently 1ms slower to run "git rev-parse --git-dir" on my machine
> (from the top-level of a repo).
> 
> 1ms is mostly irrelevant, but it adds up on scripted workloads that
> start a lot of git processes.

You know my answer to that. If scripting slows things down, we should avoid it in production code. As it is, scripting slows us down. Therefore I work slowly but steadily to get rid of scripting where it hurts most.

Ciao, Dscho

Previous: Jeff KingNext: Jeff King
Message 8 of 18 in “mingw: use OpenSSL's SHA-1 routines”
  1. mingw: use OpenSSL's SHA-1 routinesJohannes Schindelin, Feb 9, 2017
  2. Junio C HamanoFeb 9, 2017
  3. Johannes SixtFeb 11, 2017
  4. Junio C HamanoFeb 11, 2017
  5. Johannes SchindelinFeb 13, 2017
  6. Johannes SixtFeb 16, 2017
  7. Jeff KingFeb 10, 2017
  8. Johannes SchindelinFeb 10, 2017
  9. Jeff KingFeb 10, 2017
  10. Johannes SixtFeb 13, 2017
  11. Junio C HamanoFeb 13, 2017
  12. Johannes SixtFeb 13, 2017
  13. Johannes SchindelinFeb 13, 2017
  14. Johannes SixtFeb 14, 2017
  15. Junio C HamanoFeb 24, 2017
  16. Johannes SixtMar 2, 2017
  17. Junio C HamanoMar 2, 2017
  18. Linus TorvaldsFeb 25, 2017

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.