When the hash value is calculated for the element in unordered_set, it is placed in the "bucket" along with other - different elements, but the same hash value.
My experience is that items in such a bucket are stored in a singly linked list. Meaning, it gets very slow when searching inside a bucket with a bad hash function.
Is a linked list requirement a standard, or just one possible implementation? Is it possible to implement unordered_setwith setlike buckets?
source
share