This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Context diff for: Suggested improvement to std::list
- From: "Stephen M. Webb" <stephenw at cryptocard dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Wed, 12 Feb 2003 14:16:50 -0500
- Subject: Re: Context diff for: Suggested improvement to std::list
- References: <3E4A814B.BFEFBB2C@europem01.nt.com>
- Reply-to: stephenw at cryptocard dot com
On February 12, 2003 12:15 pm, Gawain Bolton wrote:
>
> Where's the catch? Well, the swap() function is seriously more
> complicated. That said, it is still constant time and cannot generate
> an exception. Is it reasonable to accept the hit for swap? I believe
> so. The one function which makes heavy use of swap() is sort(). But
> this function gets a big improvement because the 65 temporary list
> objects are going to take much less time to be created and destroyed.
>
> Please find attached the proposed patch for stl_list.h based on the
> version in GCC 3.2.2.
>
> This has been tested with all the list_* tests in
> gcc-3.2.2/libstdc++-v3/testsuite/23_containers on Solaris.
Do you have before and after timing stats?
--
Stephen M. Webb