Created
September 8, 2011 02:48
-
-
Save hidek/1202484 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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% -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment