|
I have instantiated a Am I instantiating the hash map incorrectly such that it is ignoring my custom hash and using the default hash function? phmap::flat_hash_map<my_kye_type, size_t, custom_hash_fn> hash_map; |
Answered by
greg7mdp
Nov 4, 2025
Replies: 1 comment 2 replies
|
You are instantiating the hash map correctly. The is because phmap internally add some mixing to the computed hash value to improves the distribution if the hash function is not optimal. You can disable it by defining the preprocessor variable |
2 replies
Answer selected by
ashsaki
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are instantiating the hash map correctly. The is because phmap internally add some mixing to the computed hash value to improves the distribution if the hash function is not optimal. You can disable it by defining the preprocessor variable
PHMAP_DISABLE_MIX=1.