Re: [PATCH 0/7] block-sha1: improved SHA1 hashing
- From
- Artur Skawina <art.08.09@gmail.com>
- Date
- Aug 6, 2009, 21:39 UTC
- Message-ID
- <4A7B4D84.80906@gmail.com>
- In-Reply-To
- <alpine.LFD.2.01.0908061329320.3390@localhost.localdomain>
Linus Torvalds wrote:
Show 6 quoted lines
> > with it, so it is faster for me. So your slowdown seems to be yet another > P4 thing. Dang crazy micro-architecture. > > Of course, it might be a compiler version difference too. I'm using > gcc-4.4.0.
gcc version 4.4.1 20090603 (prerelease)
Show 14 quoted lines
> Oh, I did make a small change, but I doubt it matters. Instead of doing > > TEMP += E + SHA_ROL(A,5) + (fn) + (constant); \ > B = SHA_ROR(B, 2); E = TEMP; } while (0) > > I now do > > E += TEMP + SHA_ROL(A,5) + (fn) + (constant); \ > B = SHA_ROR(B, 2); } while (0) > > which is a bit more logical (the old TEMP usage was just due to a fairly > mindless conversion). That _might_ have lower register pressure if the > compiler is silly enough to not notice that it can do it. Maybe that > matters.
before: linus 0.6622 92.17 after: linus 0.6631 92.05 after: linus 0.6601 92.46 after: linus 0.6624 92.14
IOW, no difference, just noise.