Help for this page

Select Code to Download


  1. or download this
    sub ranges_beth2 {
      my ($M, $N) = @_;
    ...
      return [ map { my $iStart=$iEnd; [$iStart, ($iEnd+=$_) - 1]
                   } (($q+1) x $r, ($q) x ($N-$r)) ];
    }
    
  2. or download this
    ---------------------------
     0 : from       0 to 9999997 (9999998)
    ...
     1 : from 2500000 to 4999999 (2500000)
     2 : from 5000000 to 7499998 (2499999)
     3 : from 7499999 to 9999997 (2499999)
    
  3. or download this
           s/iter   buk eli_ik
    buk      1.01    --   -8%
    ...
    buk    1.02/s    --   -4%
    eli_ik 1.06/s    4%    --
    
  4. or download this
    use Benchmark qw(cmpthese);
    
    ...
               , 'eli_ik' => sub { testRanges(\&ranges_beth2) }
             }
           );