I have an unordered_multimap and I insert elements which have the same key many times, so some of them should go in the same bucket. I insert exactly 10000 elements. But for some reason when I print the bucket_count() it is 12983. This makes no sense to me, unless there was a small max_load_factor, but I printed it and it seems to be set to 1.0 by default, while the load_factor is about 0.7-0.8 after I insert everything. Anyone know why it works like that? Isn't that inefficient? I could have less buckets than the number of elements I insert.
edit: almost forgot to mention, i initialize the size of the hash table as n/16 where n is the number of elements (so 10000/16=625 in this case). So this should have stayed constant right? But it doesnt. How do I change that.