I am looking for best option for having perfect hash function maps which can generate a mapping from K hashable objects to 0..|k|-1 indexes. The number K is determined at runtime, however all the K objects are known at the time of creation of the hashmap.
If you're struggling to get started the key-phrase is "minimal perfect hashing".
Adding "rust" to that search reveals a few crates. I have no experience with them.
1 Like