in reply to performance of map vs. foreach

Assuming the goal is just to create the hash keys, you left out:
"Undef' => sub { my %hash; undef @hash{1..10000}; }