The number you assign to keys is rounded up to the next power of two.my %hash; keys(%hash)=1_000_000;
My understanding is (I would be interested to learn if this is correct) that when you have more buckets you have less collisions (i.e. entries that fall into the same bucket) and so retrieval of an entry is more efficient.
In reply to Re: Populating a hash
by morgon
in thread Populating a hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |