[Bug tree-optimization/28364] poor optimization choices when iterating over a std::string (probably not c++-specific)

rakdver at atrey dot karlin dot mff dot cuni dot cz gcc-bugzilla@gcc.gnu.org
Thu Jul 13 09:00:00 GMT 2006



------- Comment #23 from rakdver at atrey dot karlin dot mff dot cuni dot cz  2006-07-13 09:00 -------
Subject: Re:  poor optimization choices when iterating over a std::string
(probably not c++-specific)

> > on your real program, how much performance do you gain by hand-rewriting
> > the assembler to look the way you like?  Just to make sure there really
> > is a problem.
> 
> I'm a little annoyed by the suggestion that this wouldn't be a real
> problem if I couldn't measure a performance difference.

sorry, but it indeed would not be.  I have seen so many examples of code
that looks bad at the first sight and preforms just fine that unless
there is something obviously wrong (which is not the case here, IMO), I
am somewhat more careful before I spend my time on fixing this type of
"bugs".

> Depending on workload, other activity on the same machine, and phase
> of moon, this loop is between .1% and 1% of runtime, and my tweaks
> make it go about a third faster.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28364



More information about the Gcc-bugs mailing list