Context diff for: Suggested improvement to std::list
Stephen M. Webb
stephenw@cryptocard.com
Wed Feb 12 19:15:00 GMT 2003
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
More information about the Libstdc++
mailing list