Boost logo

Boost :

Subject: Re: [boost] [unordered] allocators and EBO
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-08-24 07:27:36


Daniel James skrev:
> 2009/7/15 Thorsten Ottosen <thorsten.ottosen_at_[hidden]>:
>> When the allocator is empty, you should avoid storing them as members in
>> different internal structures, and make the allcator a base class of some of
>> these structures.
>
> Hi,
>
> Sorry for the late reply. I'm putting together a new version for
> release in 1.41 or 1.42 which uses EBO and a couple of other changes
> to reduce the size of the object. It's currently at 28 bytes on my
> intel mac, a saving of 8 bytes. Although I'm not sure what the
> performance implications are, so the final version might be a bit
> bigger.
>
> There are another 8 bytes that could be saved at the expense of
> performance - by removing the pointer to the first non-empty bucket
> and not storing the maximum load for the current maximum load factor
> and number of buckets. I'm not really thinking of removing them right
> now, I might in the future.
>
> I'm not using the method you suggested, as I'm wary of it introducing
> needless padding if the allocators aren't empty, but are very small (1
> or 2 bytes). I'm using compressed_pair instead.

No problem.

Thanks

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk