Wow! That that change virtually doubled the speed of the loop. Thanks,
Pete.
Background: This is my runs-of-zeros-in-a-power-of-two program.
I am searching for a run of 18 consecutive zeros. I had changed the
program so that it would detect if the current power of two has a run
of at least 13 consecutive zeros. [I changed the internal
represenation from base one billion to base ten million.] If such a
run is present the program simply proceeds to the next power of two by
doubling the current one. If such a run is not present the program
multiplies the current power by 256. The effect of that change was to
make the program about 2.5 times faster. [Reducing the picoseconds per
digit metric to about 36.] For powers of two in the region of 2^(10^9)
it turns out that the program can multiply by 256 about 99.99% of the
time. Your change has further reduced the ps/digit figure to about 19.
--
Clive