use Benchmark qw[ cmpthese ]; use List::Util qw[ first ]; our @array = 1 .. 100_000; cmpthese( -1, { func_10th => sub { first { length > 3 } @array; }, iter_10th => sub { for ( @array ) { return $_ if length > 3; } }, }); cmpthese( -1, { func_last => sub { first { length > 5 } @array; }, iter_last => sub { for ( @array ) { return $_ if length > 5; } }, }); __END__ Rate func_10th iter_10th func_10th 718/s -- -77% iter_10th 3139/s 337% -- Rate iter_last func_last iter_last 29.4/s -- -29% func_last 41.1/s 40% --