News for hackers. Stuff that matters.
Re:A hash table by any other name by tubs on Friday July 26, 2024 @03:23PM (#41081459)
They go to the same bucket because their hash *mod the size of the top array* collides.
Re:A hash table by any other name by tialaramex on Friday July 26, 2024 @03:50PM (#41081678)
This whole sub-thread is about the case where the entire hash collides

Changing which bits we use changes nothing for this problem case.

Re:A hash table by any other name by tubs on Saturday July 27, 2024 @09:13AM (#41086366)
I see what you mean here, sorry.

I guess I'd argue if you have 20 items whose full hash collides then something is pretty seriously wrong with the hashing algorithm - raise an error/exception/panic/(whatever is appropriate for the situation) and surface it.