You can get about a 30% performance improvement over the original naive code with the following:
| | my ($first, $second) = @_;
return 0 if @$first != @$second;
my $i = 0;
$second->[$i++] ne $_ && return 0 for @$first;
return 1;
|
MeowChow
s aamecha.s a..a\u$&owag.print