Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    use strict;
    ...
    # now benchmark the implementations
    use Benchmark qw/cmpthese/;
    cmpthese(-3, \%subs);
    
  2. or download this
    $VAR1 = [ 14, 28, 42, 56, 70, 84, 98, 112, 126, 140 ];
    ok 1 - grep
    ...
    grep   33107/s    --  -49%  -85%
    regex  65160/s   97%    --  -70%
    hash  218506/s  560%  235%    --