Subject: Re: [boost] unordered_map 32bit VS 64bit
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-01-26 07:46:56
On Thu, Jan 26, 2012 at 3:29 PM, Daniel James <dnljms_at_[hidden]> wrote:
> On 26 January 2012 11:16, Andrey Semashev <andrey.semashev_at_[hidden]> wrote:
>> On Thu, Jan 26, 2012 at 12:16 PM, Daniel James <dnljms_at_[hidden]> wrote:
>>> Actually functional/hash doesn't. It's good enough for the standard,
>>> but no better. For numbers that fit into the hash value, it just
>>> returns them unchanged which is fine for a prime number of buckets but
>>> not for power of 2 containers.
>> Well, we probably better fix functional/hash then?
> No, it's deliberate. It meets the standard's requirements. No more, no less.
I don't see why it shouldn't do better than required by the standard.
It's quite normal for Boost components to extend the standard and
provide superior solutions.
Anyway, if existing functional/hash functions are not suitable for the
task, we can add the bit mixing wrapper and recommend its usage with
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk