This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Power of two rehash policy


On 15 November 2017 at 17:38, Jason Arnold wrote:
> The GCC7 notes says
>
>    - A new power-of-two rehashing policy for use with the _Hashtable internals,
>    thanks to François Dumont.
>
> What do I have to do to use this instead of the default prime rehash
> policy, for example with std::unordered_set/map?

You can't use it with unordered_map, because there's no way to change
the rehash policy. You'd need to use the _Hashtable type directly,
rather than via unordered_set.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]