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

Re: x86 asm SHA1 (draft)

From
Llinux@horizon.com <linux@horizon.com>
Date
Jun 24, 2006, 01:22 UTC
Message-ID
<20060624012202.4822.qmail@science.horizon.com>
In-Reply-To
<7vzmg376ee.fsf@assigned-by-dhcp.cox.net>
Show 7 quoted lines
> The series to revamp SHA1 is good but judging the merit of each
> is outside my expertise, so I'd appreciate help to evaluate
> these changes.  For example, I cannot choose between competing
> three implementations for ppc without having access to a variety
> of ppc machines, and even if I did, ppc is not what I normally
> use, so incentive to try picking the best one for everybody is
> relatively low on my part.

Well, I'm not sure it's worth this much trouble. Both of my PPC implementations are smaller and faster than the current one, so that's a pretty easy decision. The difference between them is 2-3%, which is, I think, not enough to be worth the maintenance burden of a run-time decision infrastructure. Just pick either one and call it a day.

Show 5 quoted lines
> The only external interface for the set of SHA1 implementation
> alternatives to the outside world is a well established SHA_CTX
> type, and three functions SHA1_Init(), SHA1_Update() and
> SHA1_Final(), and the alternative implementations are supposed
> to be drop-in replaceable.

I'd prefer it it was an *opaque* SHA_CTX type. Sometimes you can achieve some useful benefits by rearranging the fields. For example, keeping the 64-bit length field as a native-order 64-bit number when appropriate. And sometimes it's useful to have the full 80-word W[] array, while other implementations don't want it.

> We probably would want to collect the benchmark results from
> popular platforms, have a summary to help people to choose a
> sensible one in the toplevel INSTALL file, and include the raw
> numbers in Documentation/technical/sha1-implementations.txt.

Not that numbers are bad, but I think that until there's a real need for more than a single good-enough version per instruction set, this is excessive. Does hashing even show up on a profile?

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 45 in “x86 asm SHA1 (draft)”
  1. linux@horizon.comJun 23, 2006
  2. Junio C HamanoJun 24, 2006
  3. linux@horizon.comJun 24, 2006
  4. Junio C HamanoJun 24, 2006
  5. From b65bc21e7d8dc8cafc70dfa6354cb66b8874b2d9 Mon Sep 17 00:00:00 2001Junio C Hamano, Jun 24, 2006
  6. linux@horizon.comJun 24, 2006
  7. Junio C HamanoJun 24, 2006
  8. linux@horizon.comJun 24, 2006
  9. PPC SHA-1 Updates in "pu"Junio C Hamano, Jun 24, 2006
  10. Linus TorvaldsJun 24, 2006
  11. Junio C HamanoJun 24, 2006
  12. Linus TorvaldsJun 24, 2006
  13. Junio C HamanoJun 24, 2006
  14. Petr BaudisJun 25, 2006
  15. Git.pm build: Fix quoting and missing GIT-CFLAGS dependencyPetr Baudis, Jun 25, 2006
  16. Junio C HamanoJun 25, 2006
  17. Petr BaudisJun 25, 2006
  18. Junio C HamanoJun 26, 2006
  19. [POOL] Who likes running Git without make install?Petr Baudis, Jul 1, 2006
  20. Junio C HamanoJul 2, 2006
  21. Junio C HamanoJul 2, 2006
  22. Petr BaudisJul 2, 2006
  23. Junio C HamanoJul 2, 2006
  24. Junio C HamanoJul 3, 2006
  25. Petr BaudisJul 3, 2006
  26. Junio C HamanoJul 3, 2006
  27. Petr BaudisJul 3, 2006
  28. Johannes SchindelinJul 3, 2006
  29. Petr BaudisJun 25, 2006
  30. Junio C HamanoJun 25, 2006
  31. Petr BaudisJun 25, 2006
  32. Johannes SchindelinJun 25, 2006
  33. Petr BaudisJun 25, 2006
  34. Junio C HamanoJun 25, 2006
  35. Johannes SchindelinJun 25, 2006
  36. Randal L. SchwartzJun 25, 2006
  37. Johannes SchindelinJun 25, 2006
  38. perl profiling (was: PPC SHA-1 Updates in "pu")Jeff King, Jun 26, 2006
  39. Junio C HamanoJun 26, 2006
  40. GIt.xs merge statusJunio C Hamano, Jun 30, 2006
  41. Pavel RoskinJun 30, 2006
  42. Junio C HamanoJun 30, 2006
  43. Pavel RoskinJun 30, 2006
  44. Johannes SchindelinJun 30, 2006
  45. Junio C HamanoJun 30, 2006

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.