Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use warnings;
- use Benchmark qw/cmpthese/;
- use Math::Random::MT;
- cmpthese(
- 10000000,
- {
- mt => sub {
- Math::Random::MT::rand(1);
- },
- rand => sub {
- rand(1);
- },
- }
- );
- ---
- (warning: too few iterations for a reliable count)
- Rate mt rand
- mt 1014199/s -- -96%
- rand 25641026/s 2428% --
Add Comment
Please, Sign In to add comment