benchmark.pl - Test performance of various random number generators
Version 1.0
Usage: benchmark.pl
This script will automatically detect available PRNG algorithms and compare them using the Benchmark module. It will keep Pure Perl and C/XS modules separate, so as to compare apples to apples.
This script currently knows about the following modules, and will compare them if they are installed.
This module will first compile all of the modules; loading time is also benchmarked and compared, but separately from the rest of the operation. For object oriented random number algorithms, the constructor is called during the benchmark loop, so overhead due to initialization is fairly counted too.
It will get 5 million integers from each, so as to provide a good sample size. You can tune this, but you'll have to edit the file.
Math::Random::ISAAC::PP (Perl)
Math::Random::ISAAC::XS (XS/C)
Math::Random::MT (XS/C)
Math::Random::MT::Perl (Perl)
Math::Random::TT800 (XS/C)
Math::Random::random_uniform_integer (XS/C)
Perl core rand() function
Jonathan Yu <jawnsy@cpan.org>
For support details, please look at perldoc Math::Random::ISAAC and use the corresponding support methods.
perldoc Math::Random::ISAAC
This has the same copyright and licensing terms as Math::Random::ISAAC::XS.
Math::Random::ISAAC::PP, Math::Random::ISAAC::XS, Math::Random::MT, Math::Random::MT::Perl, Math::Random::TT800, Math::Random::random_uniform_integer,
To install Math::Random::ISAAC::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::Random::ISAAC::XS
CPAN shell
perl -MCPAN -e shell install Math::Random::ISAAC::XS
For more information on module installation, please visit the detailed CPAN module installation guide.