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] Nathan's improvements to basic_string


On Thu, Jun 12, 2003 at 09:01:05PM +0200, Paolo Carlini wrote:
> below you will find attached the long standing patch
> contributed by Nathan, rediffed against mainline, which
> finally I and Loren got around to test for performance
> (besides the obvious regression testing).

Thanks, Paolo!

> Indeed, the improvements are easily measurable even on
> single processor machines, like my P4-2400/linux.
> ...
> Current mainline:
> -O0: 11.900u 0.000s 0:11.98 99.3%    0+0k 0+0io 204pf+0w
> -O2: 10.420u 0.010s 0:10.51 99.2%    0+0k 0+0io 204pf+0w
> 
> Current + Nathan's:
> -O0: 3.310u 0.000s 0:03.32 99.6%     0+0k 0+0io 201pf+0w
> -O2: 0.350u 0.000s 0:00.35 100.0%    0+0k 0+0io 201pf+0w
> 
> As you can see, besides a great improvement at -O0, it
> becomse also easier for the compiler to optimize away
> dead instances (I would appreciate some feedback from
> Nathan's about this additional nice feature)

I notice also the three fewer page faults, corresponding to 12K less
memory usage.  I don't know whether that's data or instruction space, 
or why.

The 3x improvement at -O0 is not very surprising.  I don't have a clue 
why -O2 does another 10x improvement over -O0 here.  

As I mentioned to Loren, I suspect there may be lots more room for 
improvement if we can eliminate the shared-library overhead, at
least for the char and wchar_t cases.

Nathan Myers
ncm-nospam@cantrip.org


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