I doubt that a for ("a",@ar,"z") {} is still that performant, because the heuristics might not detect anymore the array in between
LanX, you are right:
cmpthese(0, { map => sub {map_die(\@arr)}, for => sub {for_die(\@arr)}, }); sub map_die ($ar) { eval {map {die} 0, @$ar}; } sub for_die ($ar) { eval { for (0, @$ar) { die; } } } __DATA__ Rate for map for 1390/s -- -1% map 1404/s 1% --
Greetings,
🐻
In reply to Re^2: The Virtue of Laziness
by jo37
in thread The Virtue of Laziness
by jo37
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |