$ cat hash.pl #!/usr/bin/perl use strict; use warnings FATAL => 'all'; use Time::HiRes 'time'; my $t0 = time; my %hash; $hash{$_} = 1 for 1..3_000_000; my $t1 = time; undef %hash; my $t2 = time; print "Create: ", $t1-$t0, "\nDestroy: ", $t2-$t1, "\n";