use Benchmark 'cmpthese'; use strict; my @x = map join(',', split(//, rand(10000))), 0..80000; my %y; cmpthese(-2, {'@y{@x}' => sub { undef %y; @y{@x} = undef }, '%y = map' => sub { undef %y; %y = map(($_ => undef), @x) } } ); print 0+%y,$/;