Perfect hash function generator for functions
I have a set of C++ functions. I want to map this functions in an hash table, something like: unordered_map<function<ReturnType (Args...)> , SomethingElse> , where SomethingElse is not relevant for this question. This set of functions is previously known, small (let say less than 50) and static (is not gonna change). Since lookup performance is crucial (should be performed in O(1) ), I want to define a perfect hashing function. There exists a perfect hash function generator for this scenario? I know that there exists perfect hashing functions generators (like GPERF or CMPH ) but since I've