> (Out of curiosity what does the distribution have to do with it --
> what's a distribution for which something besides identity is better?)

Oh, I don't know... let's say you know that your keys are always even,
then you could have a hash that divides by two so that you avoid
collisions in the hash table before it fills up. This said, it
requires you to know your keys, the hash table implementation... most
likely not worth the effort to have a custom hash anyway. I did
implement custom hash functions in HPPC, but I strongly believe they
are useful only in one scenario -- when you have objects of classes
you have no control of (cannot override hashCode()) and you know their
implementation of hashCode is weak.

Dawid

Reply via email to