How to pre-allocate memory for a large hash in Perl

As an lvalue “keys” allows you to increase the number of hash buckets allocated for the given hash. This can gain you a measure of efficiency if you know the hash is going to get big.

Taken from

perldoc -f keys

. Awesome!

Leave a Reply