Take the 2-minute tour ×  I've been puzzling over this for a few
days... feel free to shoot down any of my assumptions.  We're
using a Dictionary with integer keys. I assume that the value of
the key in this case is used directly as the hash. Does this
mean (if the keys are grouped over a small range) that the
distribution of the key hash (same as the key itself, right?)
will be in a similarly small range, and therefore a bad choice
for a hashtable?  Would it be better to provide an
IEqualityComparer that did something clever with primes and
modulo mathematics to calculate a better distributed hash?
share|improve this question it depends on the distribution of
your integer keys. Keys are already modulo'ed by a prime when
calculating the hash bucket.. –  Mitch Wheat Sep 7 '09 at 8:59
Why assume the hash code is the same as the integer value? Test
it! –  SteveD Sep 7 '09 at 9:09 Hash code IS the same as the
integer value. –  spender Sep 7 '09 at 9:57 add comment  3
Answers  up vote 4 down vote accepted  It's n