Subject: | Inconsistent runtimes |
Hello,
The runtimes for log on large integers are strange.
I'm running perl 5.8.8 on Ubuntu 8.04 (2.6.24-16-generic). perl
-Mbignum=v returns
bignum v0.17
Math::BigInt v1.77 lib => Math::BigInt::Calc v0.47
Math::BigFloat v1.51
To reproduce:
$ time perl -Mbignum -le 'log 2**2001'
real 0m0.101s
user 0m0.088s
sys 0m0.012s
$ time perl -Mbignum -le 'log 2**2000'
real 0m6.248s
user 0m6.232s
sys 0m0.016s
Regards
Christian Riis