in reply to BigInt, some of the time

One simple way is to use Math::BigInt for all of them. use Math::BigInt ':constant', lib => 'Pari,GMP'; That will make all integers bigints, and use the high-test libs if available. That will help make up for the overhead.

After Compline,
Zaxo