Decimal can be Binary Too (was decimal or rational)
Nick Perkins
nperkins7 at home.com
Wed Jun 13 18:43:51 EDT 2001
"Mikael Olofsson" <mikael at isy.liu.se> wrote in message
news:XFMail.20010608083930.mikael at isy.liu.se...
> .....< about fastest way to multiply by ten>...
> What's more expensive here, add or shift? I'm more into hardware, and
> hardwired shifts are costless (disregarding overflow checks), while
> hardwired adds are not.
I am not an expert on modern CPU architechture, but I strongly suspect that
things like multiplying two integers are already optimized, and that there
would be no advantage to trying to be tricky about it. Besides, you should
let the C compiler decide which way is fastest.
More information about the Python-list
mailing list