3 ms·
I recommend reading up on minimal perfect hashing: http://ilan.schnell-web.net/prog/perfect-hash/algo.html http://ilan.schnell-web.net/prog/perfect-hash/algo.ht
by layoutIfNeeded 7y ago
I recommend reading up on minimal perfect hashing: http://ilan.schnell-web.net/prog/perfect-hash/algo.html http://ilan.schnell-web.net/prog/perfect-hash/algo.html
- chaboud 7y agoThis is what came to mind when I read this. Far too many professional programmers are unaware of perfect hash functions. A disturbing number are unaware of pathological collision cases. For a complete set of methods known at compile time, a minimal perfect hash is, well, kinda perfect...
- trishume 7y agoIn this case I did actually consider it but forgot to mention it in my post. The slightly more complex constraints of having multiple different tables using the same hash function make searching for the hash function more annoying so I didn’t bother.