Are there faster hash functions for unordered_map/set in C++?
问题 Default function is from std::hash. I wonder if there are better hash functions for saving computational time? for integer keys as well as string keys. I tried City Hash from Google for both integer and string keys, but its performance is a little worse than std::hash. 回答1: std::hash functions are already good in performance. I think you should try open source hash functions. Check this out https://github.com/Cyan4973/xxHash. I quote from its description: "xxHash is an Extremely fast Hash