This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Second half of 29385 + improving operator=() in tree containers
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Ion Gaztañaga <igaztanaga at gmail dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sun, 26 Nov 2006 11:15:20 +0100
- Subject: Re: [Patch] Second half of 29385 + improving operator=() in tree containers
- References: <45684552.9090104@suse.de> <4568E98B.1040006@gmail.com>
Ion Gaztañaga wrote:
Paolo Carlini wrote:
Hi again,
the second half, basically Ion's idea (can you have a look? Thanks in
advance!), tested x86-linux. I'll wait until tomorrow...
Paolo.
///////////////////
Seems correct.
Thanks.
If you want another idea (much more complicated than the equal_range
trick, I'm afraid) I found the way to improve operator=() in tree
containers. The idea is to reuse old nodes instead of destroying the
old tree and creating a new one:
[snip]
What can I add, thanks a lot again! To remember this new great idea I'm
opening a new enhancement PR, will actuall work on it as soon as I can...
Paolo.