Earlier quoted context omitted.
The 4cc gets a decent distribution in that you don't have to examine very many collisions to find the character you're looking for (or conclude it's not found). A poor distribution is an obvious bug in hashing; if you don't suffer from that bug, you don't have to do anything. If you have the bug, it's obvious you have to change your hash calculation to avoid it. The developers of 4cc may have struggled with bugs wher…
> A poor distribution is an obvious bug in hashing; if you don't suffer from that bug, you don't have to do anything. Right, but if you don't have and solve that problem then what you have made isn't a hash table. Often you don't need a hash table - if you have something that already has a nice distribution, you can use a simpler data structure (like, IDK, a radix tree) and get all the properties you wanted. > The in…
The key aspect of the four corner code is that it mashes together completely unrelated characters. There's no meaningful index to it. It's not easy to look at a four corner code to figure out the list of characters it aliases for.