Re: [PATCH 0/7] block-sha1: improved SHA1 hashing
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Aug 8, 2009, 17:10 UTC
- Message-ID
- <alpine.LFD.2.01.0908081004560.3288@localhost.localdomain>
- In-Reply-To
- <4A7D0E7B.3030601@gmail.com>
On Sat, 8 Aug 2009, Artur Skawina wrote:
Show 5 quoted lines
> > I've inlined the byteswapping in 'opensslb', maybe that one will > do a bit better. > > http://www.src.multimo.pl/YDpqIo7Li27O0L0h/sha1bench.tar.gz
Hmm. Testing on my atom, the inlined bswap is worse, but the asm versions are generally superior to any C one:
# TIME[s] SPEED[MB/s] rfc3174 2.194 27.82 rfc3174 2.19 27.87 linus 0.947 64.45 linusph 0.9381 65.06 linusv 0.8943 68.25 linusvph 0.8803 69.34 linusasm 0.9349 65.29 linusp4 1.006 60.66 linusas 1.062 57.48 linusas2 1.009 60.5 mozilla 2.264 26.96 mozillaas 2.197 27.78 openssl 0.648 94.19 opensslb 0.7419 82.27 spelvin 0.636 95.96 spelvina 0.6671 91.49 nettle 0.717 85.12 nettle-ror 0.7137 85.52 nettle-p4sch 0.7158 85.27
Interestingly, -mtune=prescott does well for that 'linusv' version on atom too, and gets it up to
linusv 0.8365 72.96
and it's the only one that improves. Odd interactions.
Linus