in reply to Re^4: counting backward (optimize foreach reverse low .. high
in thread counting backward
Or i'll use for;;;
It's a shame you can't use the c-style for as a modifier:
cmpthese -1, { a=>q[ 1 for -1e6..0; ], b=>q[ for( my $i=1e6; $i; --$i ){ 1 } ] };; Rate b a b 14.0/s -- -26% a 19.0/s 35% --
|
|---|