The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

benchmark.pl - Test performance of various random number generators

VERSION

Version 1.0

SYNOPSIS

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.

DESCRIPTION

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.

ALGORITHMS

  • 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

AUTHOR

Jonathan Yu <jawnsy@cpan.org>

SUPPORT

For support details, please look at perldoc Math::Random::ISAAC and use the corresponding support methods.

LICENSE

This has the same copyright and licensing terms as Math::Random::ISAAC::XS.

SEE ALSO

Math::Random::ISAAC::PP, Math::Random::ISAAC::XS, Math::Random::MT, Math::Random::MT::Perl, Math::Random::TT800, Math::Random::random_uniform_integer,