Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use Benchmark;
    ...
     'ref'  => '$ret = bar(\@x)',
     'list' => '@ret = foo(\@x)',
    });
    
  2. or download this
    Benchmark: timing 1 iterations of list, ref...
          list:  1 wallclock secs ( 0.36 usr +  0.11 sys =  0.47 CPU) @  2
    +.13/s (n=1
    ...
           ref:  0 wallclock secs ( 0.11 usr +  0.00 sys =  0.11 CPU) @  9
    +.17/s (n=1
    )
                (warning: too few iterations for a reliable count)