Help for this page

Select Code to Download


  1. or download this
    use strict;
    use Benchmark qw(cmpthese);
    ...
       b => '$m = $_ for (1..$n)',
       c => 'for ($i=1;$i<$n+1;$i++) {$m = $i}'
    });
    
  2. or download this
    use strict;
    use Benchmark;
    ...
    my $t1 = new Benchmark;
    my $td = timediff($t1, $t0);
    print "x: ",timestr($td),"\n";