This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Context diff for: Suggested improvement to std::list


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]