|
Boost : |
Subject: Re: [boost] [optional] memory use for optional refs and ptrs
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-10-15 07:28:15
On 2010-10-14 17:29, Larry Evans wrote:
>
> I think the most efficient storage would be in descending order of
> alignment values followed by the bits for the tags. The reason for
> this is that a type with a smaller aligned value can be used to
> fill the padding for the previous type. Since the bool tags
> have align==1, they could go last.
I looked into your results, nice. I think you're right.
> which shows 0 padding using this rule. Of course, as shown by
> the output for bools_A_type, that's not the only way to get 0
> padding for a set of types.
I guess the reverse-ordering-rule is probably the simplest rule, and
those are usually the best.
Cheers,
Rutger
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk