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% --
In reply to Re^5: counting backward (optimize foreach reverse low .. high
by BrowserUk
in thread counting backward
by ag4ve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |