I was told that shifts were faster then additions but the pdf
"How to optimize for the Pentium® microprocessors" from
http://www.agner.org/assem/ says that shifts should be avoided on
Pentinum 4 and additions should be used instead. Which is right?

>Which is right?
Both. Any decent processor will show that shifts are faster, but the Pentium 4 is gimped in this case.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.