
On 05/15/2006 07:49 AM, David Abrahams wrote:
Joel de Guzman <joel@boost-consulting.com> writes:
David Abrahams wrote: [snip]
Seems to me a vector can't do as well as some other structures when many of the elements of the tuple are empty classes.
In terms of memory footprint?
Yes.
Isn't the list<T0,T1,T2,...> memory the same as that of: struct { T0 car; struct { T1 car; struct { T2 car; struct { ... } cdr; } cdr; } cdr; }; and the vector<T0,T1,T2,...> memory the same as that of: struct { T0 m0; T1 m1; T2 m2; ... } ? If so, what's the reason the memory footprints would be different? If not, could you explain what is the footprint, preferably using some struct counterpart like those above? TIA.