Help for this page

Select Code to Download


  1. or download this
    Benchmark: timing 100000 iterations of rollahead, unroll, unroll2...
     rollahead: 22.9776 wallclock secs (22.93 usr +  0.02 sys = 22.95 CPU)
    + @ 4357.30/s (n=100000)
    ...
    unroll    4338/s        --       -0%       -3%
    rollahead 4357/s        0%        --       -2%
    unroll2   4468/s        3%        3%        --
    
  2. or download this
    sub unroll2 {
        my @x = $_[0] =~ /(?:^|@)((?:#[#@]|[^#@])*)/g;
    ...
            $_ =~ s/#@/@/g;
        } @x
    }