From: Conor S. <cs...@tp...> - 2000-12-29 03:39:24
|
> Floating point multiplication can be fast on PC based systems. Some > compilers can choose to turn all your * 2 into << 1 automatically for you > for integers. A compiler somewhere probably does the same thing for floats, except with additions/subtractions to the exponent. I think that for integers an addition is still better, but I may be wrong. But now a days, it doesn't make much difference. I still use shifts reasonable often, but then again, I have uses for 2^x :) > > IMO nothing to get too stressed about. Whatever is readable and debuggable. > :) Bingo :) Conor Stokes |