Why setting HashTable's length to a Prime Number is a good practice?
问题 I was going through Eric Lippert's latest Blog post for Guidelines and rules for GetHashCode when i hit this para: We could be even more clever here; just as a List resizes itself when it gets full, the bucket set could resize itself as well, to ensure that the average bucket length stays low. Also, for technical reasons it is often a good idea to make the bucket set length a prime number, rather than 100. There are plenty of improvements we could make to this hash table. But this quick