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

Re: [PATCH] block-sha1: more good unaligned memory access candidates

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Aug 13, 2009, 19:54 UTC
Message-ID
<alpine.LFD.2.01.0908131246300.28882@localhost.localdomain>
In-Reply-To
<7v63crbja2.fsf@alter.siamese.dyndns.org>
On Thu, 13 Aug 2009, Junio C Hamano wrote:
> 
> Wow.  Is it now faster than the arm/ and ppc/ hand-tweaked assembly?
For the good cases, yes.

For POWER, with gcc-4.4, the C code apparently outperforms the asm code on POWER6. The asm code is scheduled for POWER4, and I think outperforms the C code there. Also, when compiling in 64-bit mode (with "-m64"), at least some versions of gcc seem to do some stupid things and add extra zero extension stuff, and that performed suboptimally at least on a PPC G5.

So it's certainly not a clear case of "the C code outperforms the asm code", but in BenH's tests, the best numbers really did come from the C version. With some silly cases of at least some versions gcc screwing up (not reload, but zero extension), and making it noticeably slower.

IOW, the PPC situation really isn't that different from x86. 
			Linus
Previous: Junio C HamanoNext: Nicolas Pitre
Message 5 of 15 in “block-sha1: more good unaligned memory access candidates”
  1. block-sha1: more good unaligned memory access candidatesNicolas Pitre, Aug 13, 2009
  2. Linus TorvaldsAug 13, 2009
  3. Nicolas PitreAug 13, 2009
  4. Junio C HamanoAug 13, 2009
  5. Linus TorvaldsAug 13, 2009
  6. Nicolas PitreAug 13, 2009
  7. block-sha1/sha1.c: silence compiler complaints by casting void* to uintptr_tBrandon Casey, Aug 14, 2009
  8. Johannes SchindelinAug 15, 2009
  9. Linus TorvaldsAug 15, 2009
  10. Brandon CaseyAug 15, 2009
  11. Junio C HamanoAug 15, 2009
  12. Brandon CaseyAug 15, 2009
  13. Junio C HamanoAug 15, 2009
  14. Linus TorvaldsAug 15, 2009
  15. Brandon CaseyAug 15, 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.