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: Suggested improvement to std::list


On February 13, 2003 08:13 am, Nathan Myers wrote:
> On Thu, Feb 13, 2003 at 12:10:38PM +0100, Gawain Bolton wrote:
> > Yes I've done some performance testing on sparc-sun-solaris2.6 and can
> > tell you that roughly:
> >
> >   1. Default std::list constructor is 2 orders of magnitude faster.
> >   2. std::list::swap() is 4 times slower.
> >
> > Your mileage will vary, according to how expensive it is to allocate
> > dynamic memory on your system and how fragmented your system's memory is
> > at the time of the test.
>
> I'd like to hear what Matt Austern has to say about this.  If he's happy,
> I'm happy (R^2 == 0.8).

I'm in agreement with that sentiment.

The only objections I have have to do with allocator::pointer types not being 
naked pointers and allocators with instances not comparing equal.  Since the 
current container implementations don't support sophisticated allocator 
pointer types, no existing code would break (and the allocator comparison 
issue is a whole other can of worms).

I think it's a sensible improvement.

-- 
Stephen M. Webb


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