sub myRand{ unpack('Q', pack'C8', map rand()*256, 1 ..8) / 2**64 } undef%hash; say time; ++$hash{ int( 50000*myRand() ) } while keys %hash < 50000; say time;; 1376006416.04139 1376006418.40272 say ~~keys %hash;; 50000 print sum values %hash;; 543283