Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-12-23 13:16:18


Larry Evans wrote:
> On 12/13/2004 06:20 PM, Joel wrote:
> [snip]
>> Whenever I have some more free time (too much to chew), I
>> am writing some docs for fusion. A part of it will be
>> dedicated to a rationale which shall attempt to explain why
>> a flat structure is generally optimal. I did have some tests.
>
> Searching past posts containing tuple showed:
>
> http://lists.boost.org/MailArchives/boost/msg23983.php
>
> which claims inheritance causes extra padding; hence,
> this is one advantage of flat vs. inherited structure.

Another is that (unless you use nonstandard language extensions) only
flat structures allow O(1) random access.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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