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


I did some testing on a 1.4 GHz Opteron, which generally seems
comparable to a 2.4GHz P4.

On Thu, Jun 12, 2003 at 01:14:00PM -0700, Nathan Myers wrote:
> On Thu, Jun 12, 2003 at 09:01:05PM +0200, Paolo Carlini wrote:
> > 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

The first interesting result is that at -O1 it says 

gnu/include/c++/3.4/x86_64-unknown-linux-gnu/bits/atomicity.h: In 
   function `int main()':
/amd/ncm/gnu/include/c++/3.4/x86_64-unknown-linux-gnu/bits/atomicity.h:43: error: inconsistent
      operand constraints in an `asm'

Otherwise, I get 

             -O0  -02  -O3
no patch     3.8  2.9  2.9
with patch   2.3  0.7  0.6

(Note that times varied as much as 20% on an unloaded system.)

The gains aren't as dramatic as on p4.  The compiler seems much
better at teasing performance out of the p4, or maybe the p4 needs
a lot more hand-holding to give reasonable performance, and does
much worse with unoptimized code than the opteron.

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]