From: Artur Skawina Date: Thu, 06 Aug 2009 21:39:16 GMT Subject: Re: [PATCH 0/7] block-sha1: improved SHA1 hashing Message-ID: <4A7B4D84.80906@gmail.com> In-Reply-To: Linus Torvalds wrote: > > 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) > 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.