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: [PATCH] _M_replace (take3): better clean up + speed ups!!



Hey Paolo. This looks good. 

> mainline
> --------
> Execution time of 100000 string::append(const string&) calls: 0.09 sec.  <----
> Execution time of 1000000 string::append(const string&) calls: 0.86 sec.  <----
> Execution time of 10000000 string::append(const string&) calls: 8.59 sec.  <----
> 
> mainline + this patch
> ---------------------
> Execution time of 100000 string::append(const string&) calls: 0.05 sec.  <----
> Execution time of 1000000 string::append(const string&) calls: 0.35 sec.   <----
> Execution time of 10000000 string::append(const string&) calls: 3.56 sec.   <----
> 
> 2.95.3
> ------
> Execution time of 100000 string::append(const string&) calls: 0.05 sec.   <----
> Execution time of 1000000 string::append(const string&) calls: 0.35 sec.   <----
> Execution time of 10000000 string::append(const string&) calls: 3.55 sec.   <----

So, with this patch, the last of the performance regressions WRT 
std::string between v2 and v3 is fixed? That would be great.

> 2001-12-09  Paolo Carlini  <pcarlini@unitus.it>
>             Nathan Myers  <ncm@cantrip.org>
> 
>         * include/bits/basic_string.tcc (_M_replace_safe): New.
>         * include/bits/basic_string.tcc (_M_replace(input_iterator_tag),
>         append members): use it.
>         * include/bits/basic_string.tcc (_M_replace(forward_iterator_tag)): Remove.
>         * include/bits/basic_string.h: Adjust declarations.

You can just list basic_string.tcc once. 

Is there anyway you can add some documentation for this? That would be 
much appreciated.

thanks,
benjamin


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