I have a set of C++ functions. I want to map this functions in an hash table, something like: unordered_map
Ok, maybe not what you want to hear but consider this: since you talk about a few functions, less than 50, the hash lookup should be negligible, even with collisions. Have you actually profiled and saw that the lookup is critical?
So my advise is to focus your energy on something else, most likely a perfect hash function would not bring any kind of improved performance in your case.
I am going to go one step further and say that I think that for less than 50 elements a flat map (good ol' vector
) would have similar performance (or maybe even better due to cache locality). But again, measurements are required.