Re: [PATCH 0/7] block-sha1: improved SHA1 hashing
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Aug 6, 2009, 22:33 UTC
- Message-ID
- <alpine.LFD.2.01.0908061531310.3390@localhost.localdomain>
- In-Reply-To
- <alpine.LFD.2.01.0908061502570.3390@localhost.localdomain>
On Thu, 6 Aug 2009, Linus Torvalds wrote:
Show 8 quoted lines
> > Anyway, on P4 I think you have two double-speed integer issue ports (ie > max four ops per cycle), but only one of them takes a rotate, and only in > the first half of the cycle (ie just one shift per cycle). > > And afaik, that is actually the _improved_ state in Prescott. The older > P4's didn't have a full shifter unit at all, iirc: shifts were "complex > instructions" in Northwood and weren't even single-clock.
Yeah, verified. Google for
northwood "barrel shifter"
and you'll find a lot of it.
Basically, older P4's will I think shift one bit at a time. So while even Prescott is relatively weak in the shifter department, pre-prescott (Willamette and Northwood) are _really_ weak. If your P4 is one of those, you really shouldn't use it to decide on optimizations.
Linus