This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] Two versions of struct _Rb_tree_impl... or not?!
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Dhruv Matani <dhruvbird at gmx dot net>
- Cc: rittle at latour dot rsch dot comm dot mot dot com, libstdc++ at gcc dot gnu dot org
- Date: Wed, 07 Jul 2004 13:56:43 +0200
- Subject: Re: [RFC] Two versions of struct _Rb_tree_impl... or not?!
- References: <40EAD3ED.4040205@suse.de> <2130.1089177215@www5.gmx.net>
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.