Guest User

Untitled

a guest
Jan 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. use strict;
  2. use warnings;
  3. use Benchmark qw/cmpthese/;
  4. use Math::Random::MT;
  5.  
  6. cmpthese(
  7. 10000000,
  8. {
  9. mt => sub {
  10. Math::Random::MT::rand(1);
  11. },
  12. rand => sub {
  13. rand(1);
  14. },
  15. }
  16. );
  17.  
  18. ---
  19.  
  20. (warning: too few iterations for a reliable count)
  21. Rate mt rand
  22. mt 1014199/s -- -96%
  23. rand 25641026/s 2428% --
Add Comment
Please, Sign In to add comment