The Perl 5 module Math::GMP gives you access to the fast GMP library for fast big integer math.