use Benchmark; use strict; use List::Util qw(first); my @x = (0..50000); Benchmark::cmpthese(1000000, { 'Grep' => 'my $y = grep {$_ == 45000} @x', 'Util' => 'my $y = first {$_ == 45000} @x' }); # Ergibt Rate Util Grep Util 914077/s -- -63% Grep 2463054/s 169% --