No such thing as a small change | |
PerlMonks |
Re^5: bigint == horrible performance?by syphilis (Archbishop) |
on Nov 08, 2011 at 12:17 UTC ( [id://936766]=note: print w/replies, xml ) | Need Help?? |
Arbitrary precision math is, regardless of the language in which it is written, much, much slower than fixed precision I didn't do any benchmarking but my hunch is that the real slowdown wrt the op's code (when used with bigint) came about as a result of the multiplication and division operators being replaced by function calls. But then ... replacement of "operators" with "function calls" is really part and parcel of how arbitrary precision math works, so I'm not sure that stating my "hunch" actually contributes anything terribly useful ... even if it *is* correct. Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|