erik wrote:
The number of buckets is prime because it's a simple way to get an even distribution of words across the buckets.
Sorry, I'm bad in math, but how does having (prime #) of buckets ensure an even distribution. I thought that's more of a function of the hash algorithm.
Say, if you have a poor hash function:
return _myString.GetHashCode() % 2;
then, having 1009 buckets wouldn't help. Would it?