News for hackers. Stuff that matters.
Re:Simplest Hash Functions by ogogmad on Sunday April 12, 2026 @05:47AM (#47737752)
Let's consider a hash table with an allocation of 1MB, which is about 2^20 bytes. Assume also that each entry occupies a byte. Assuming that the hash function's values are distributed randomly, the probability of there being a collision with only 1000 entries is approximately 38% = 1-(2^20)!/(2^20 - 1000)!/(2^20)^1000. See the "Birthday Problem".

There are no comments on this comment yet.