Actually, Perl doesn't have to call the hash function for each key as the full hash value is stored along with the key so Perl just needs to compute the remainder between that value and the new number of buckets.
Another question is whether Perl decides to allocate more buckets based on the number of buckets in use or on the number of keys. I remember being surprised by the answer to this and vaguely remember that the answer has changed. Unfortunately I don't have the time right now to dig this information up.
- tye (but my friends call me "Tye")In reply to (tye)Re: print scalar %hash... erm
by tye
in thread print scalar %hash... erm
by pileswasp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |