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

Re: [PATCH] Put sha1dc on a diet

From
Jeff King <peff@peff.net>
Date
Mar 13, 2017, 15:13 UTC
Message-ID
<20170313151322.ouryghyb5orkpk5g@sigill.intra.peff.net>
In-Reply-To
<CY1PR0301MB2107112BCC2DECD215E70549C42A0@CY1PR0301MB2107.namprd03.prod.outlook.com>
On Sat, Mar 04, 2017 at 01:07:16AM +0000, Dan Shumow wrote:
Show 6 quoted lines
> You are very welcome.  Thank you for the warm welcome.  As it turns
> out, Marc and I are working on the simplifications / removal of c99
> and performance upstream in our GitHub repo.  I am happy to help for
> any GitHub specific customizations that are needed as well.  But for
> now, lets see if we can get you everything you want upstream -- I
> think that's the most simple.
I've been watching the repo at:
  https://github.com/cr-marcstevens/sha1collisiondetection

The work on the feature/performance branch seems to be producing good results. The best timings I got show sha1dc (with checks enabled) at 1.75x block-sha1, which is pretty good. That was using your ad744c8b7a841d2afcb2d4c04f8952d9005501be.

Curiously, the performance gets worse after that. Even more curious, the bad performance bisects to a merge, and it performs worse than either side of the merge.

Try this:
  # mine is a 1.2GB linux packfile, but anything big should do
  file=/some/large/file
  # the merge with the funny behavior
  merge=55d1db0980501e582f6cd103a04f493995b1df78
  for i in $merge^ $merge^2 $merge; do
    git checkout $i &&
    rm -f bin/* &&
    make &&
    time bin/sha1dcsum $file
  done
I get:
  [$merge^, the feature/performance branch before the merge]
  real	0m3.391s
  user	0m3.304s
  sys	0m0.084s
  [$merge^2, the master branch before the merge]
  real	0m5.272s
  user	0m5.164s
  sys	0m0.096s
  [$merge, the merge of the two]
  real	0m7.038s
  user	0m6.924s
  sys	0m0.104s

So that's odd. Looking at the diff, I don't see anything that obviously jumps out as a mis-merge.

Feel free to tell me "stop looking at that branch; it's a work in progress". But I think the results from $merge^ (ad744c8b7) are getting good enough to consider moving forward with integrating it into git.

-Peff
Previous: Dan ShumowNext: Jeff King
Message 26 of 36 in “Put sha1dc on a diet”
  1. Put sha1dc on a dietLinus Torvalds, Mar 1, 2017
  2. Junio C HamanoMar 1, 2017
  3. Linus TorvaldsMar 1, 2017
  4. Jeff KingMar 1, 2017
  5. Junio C HamanoMar 1, 2017
  6. Johannes SchindelinMar 1, 2017
  7. Junio C HamanoMar 1, 2017
  8. Linus TorvaldsMar 1, 2017
  9. Johannes SchindelinMar 1, 2017
  10. Linus TorvaldsMar 1, 2017
  11. Jeff KingMar 1, 2017
  12. Duy NguyenMar 2, 2017
  13. Johannes SchindelinMar 2, 2017
  14. Linus TorvaldsMar 2, 2017
  15. Jeff HostetlerMar 2, 2017
  16. Linus TorvaldsMar 2, 2017
  17. Johannes SchindelinMar 2, 2017
  18. Johannes SchindelinMar 2, 2017
  19. Jeff KingMar 1, 2017
  20. Linus TorvaldsMar 1, 2017
  21. Jeff KingMar 1, 2017
  22. Linus TorvaldsMar 1, 2017
  23. Dan ShumowMar 2, 2017
  24. Junio C HamanoMar 2, 2017
  25. Dan ShumowMar 4, 2017
  26. Jeff KingMar 13, 2017
  27. Jeff KingMar 1, 2017
  28. Jeff KingMar 13, 2017
  29. Marc StevensMar 13, 2017
  30. Linus TorvaldsMar 13, 2017
  31. Marc StevensMar 13, 2017
  32. Jeff KingMar 13, 2017
  33. Marc StevensMar 13, 2017
  34. Marc StevensMar 16, 2017
  35. Jeff KingMar 16, 2017
  36. Dan ShumowMar 16, 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.