Help for this page

Select Code to Download


  1. or download this
    $ perl sortbench.pl
    Benchmark: timing 1000 iterations of f_alpha, f_owtdi, f_sship, i_alph
    +a,
    ...
    i_alpha 27.4/s    129%    127%     40%      --     -8%    -10%
    f_sship 29.8/s    149%    147%     52%      9%      --     -2%
    i_sship 30.5/s    155%    152%     56%     11%      2%      --
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    use Benchmark 'cmpthese';
    ...
          f_alpha   => sub { @sfl = sort               @afl },
          i_alpha   => sub { @sin = sort               @ain },
        });