Hi Tomas, > > This helped a lot! The 634 seconds reduced to 37 seconds, a 17-fold > > speed improvement :-) > > great! Does it mean that the speed is proportional to the number of > digits processed in one go, i.e. about 9 times faster on a 32 system and > about 18 times faster on a 64 bit system? I guess there must be other > trick as the printing time was negligible using gmp.
Yes, the time increases nearly exponentially with the number length, as it is a loop of additions over the whole number for each non-zero bit. So the speed improvement is noticeable only for large numbers. Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe