our @a = @b = @c = '0001' .. '1000';; cmpthese -1,{ a => q[ $_ += 0 for @a; ], b => q[ my @new; push @new, $_ + 0 while defined( $_ = shift @b ) ], c => q[ $c[ $_ ] += 0 for 0 .. $#c; ] };; Rate c a b c 6220/s -- -37% -100% a 9893/s 59% -- -100% b 4562313/s 73247% 46016% -- #### our @a = @b = @c = @d = '00001' .. '10000';; cmpthese -1,{ a => q[ $_ += 0 for @a;], b => q[ my @new; push @new, $_ + 0 while defined( $_ = shift @b ) ], c => q[ $c[ $_ ] += 0 for 0 .. $#c; ], d => q[ my @new = map $_ += 0, @d ] };; Rate d c a b d 258/s -- -58% -72% -100% c 615/s 138% -- -34% -100% a 932/s 261% 52% -- -100% b 4651085/s 1800042% 756579% 499189% --