
15 Oct
2010
15 Oct
'10
11:28 a.m.
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