【发布时间】:2011-10-23 08:22:00
【问题描述】:
来自perldata:
You can preallocate space for a hash by assigning to the keys() function.
This rounds up the allocated buckets to the next power of two:
keys(%users) = 1000; # allocate 1024 buckets
是否有一个经验法则可以说明何时调整哈希值会提高性能?
【问题讨论】: