Subj : Re: Multiplications faster than bit shifts? To : comp.programming From : Willem Date : Sat Jul 09 2005 08:42 pm Eric wrote: ) I read a post by someone recently, and they asserted that multiplications by ) two were faster on recent x86 cpus than simple bit shifts. ) ) I have a very hard time believing a simple shift would take longer than a ) multiplication and wanted to know what you people thought about this. A multiplication by two is (probably) slower than a shift by one bit, but a multiplication by sixteen is probably faster than a shift by four bits. This is because recent x86 cpus don't have barrel shifters anymore, so they have to do X consecutive shifts to get a shift by X bits. I'm not sure where the boundary is between a shift or a multiply being faster. SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT .