Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
A good hash function is of course desireable, and a prime size is surely unnecessary then. But it's nice if the implementation behaves reasonably even for lousy hash functions, especially if the table is
Is it?
used for the ordinary mappings where it can be user supplied.
It basically means that you try to improve on the hash function by adding one extra computational round (the prime modulo). This is a half-hearted fix at best. IMO if someone supplies a bad hash function, they can't expect the system to fix it. It would imply that due to this "fix" we might make perfectly good hash-functions worse.