Boost logo

Boost :

Subject: Re: [boost] unordered_map 32bit VS 64bit
From: Daniel James (dnljms_at_[hidden])
Date: 2012-01-25 08:15:20

On 25 January 2012 12:33, Stewart, Robert <Robert.Stewart_at_[hidden]> wrote:
> Avikam Bara-nes wrote:
>> I'm porting a project from Linux 32bit to Linux 64bit. While
>> doing so I notice that I have a dramatic performance
>> degradation with unordered_map.
>> My platform is Ubuntu 10.4.3 64bit running on Intel Xeon
>> X3220 but, I tested similar program on WindowsXP SP2 64bit
>> which running on Intel i5 and I get the same degradation. My
>> boost version is 1_46_1.
> I presume that you've ensured that there's sufficient memory available for the 64b process?  That is, it isn't suffering from swapping, is it?

FWIW I had a quick look at this earlier, and it appears to be mainly
caused by a check to see if the container is empty before searching
(after removing it, the benchmark was about the same for 32 and 64
bit). The check is there because an empty unordered_map doesn't
allocate any memory (a feature request from a while back). I'm a bit
surprised that it's so costly, considering the other things that find
has to do. I suspect it's something to do with the optimizer. I'll
look into it in more detail later.

Boost list run by bdawes at, gregod at, cpdaniel at, john at