Help for this page

Select Code to Download


  1. or download this
    Benchmark: timing 100000 iterations of 1, 2, 3...
    1: 22 wallclock secs @ 4553.73/s
    2: 13 wallclock secs @ 7575.76/s
    3: 15 wallclock secs @ 6765.90/s
    
  2. or download this
    use strict;
    use Benchmark;
    ...
    timethese(100000, {'1' => sub { method1($str) },
                       '2' => sub { method2($str) },
                       '3' => sub { method3($str) }});