I am trying to do a performance benchmark on C++11's std::unordered_map container.
I want to see how the load factor of the container affects performance for insertions. Specifically because I am interested in using a hash table as base data structure for finding pairs in a huge set of numbers.
As I understand the documentation, this does not seem possible. I can set the amount of buckets with a rehash()
but this is done automatically any time the max_load_factor
is exceeded.
I can set the max_load_factor
but as I understand it, this only determines when a rehash is performed, it does not allow the table to be placed under heavy strain, which is what I want to do.
Is there any way for me to hard limit the amount of buckets in a hash table?
Aucun commentaire:
Enregistrer un commentaire