[RFC] Two versions of struct _Rb_tree_impl... or not?!
Paolo Carlini
pcarlini@suse.de
Wed Jul 7 11:55:00 GMT 2004
Dhruv Matani wrote:
>What I think has happened is that the v3.3 and before has only a pointer to
>the actual root node, and newer versions have the actual node as part of the
>implementation structure. Hence, the difference in the size. Actually, the
>current method of having the actual node is better, because there is one
>poiner indirection less for every rb_tree operation.
>
>
Yes, I learned the details of this myself yesterday. Thanks for the
explanation, anyway.
>Anyways, the patch is ready, and there will not be much effort required from
>here on, so I guess the complexity issue should not come in. Consider that
>you have an array of say 100 maps, then the memory saved would be something
>like 400 bytes for x86 systems, which is quite a lot. We can save something
>like 400/32 cache lines with this simple optimization.
>
>
Ok, let's proced like that: I will regtest the patch throughly during
the next days,
on at least two different architectures. If everything goes well and
nobody objects
to it, we'll apply it to mainline...
Paolo.
More information about the Libstdc++
mailing list