This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/28364] poor optimization choices when iterating over a std::string (probably not c++-specific)
- From: "rakdver at atrey dot karlin dot mff dot cuni dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2006 23:39:39 -0000
- Subject: [Bug tree-optimization/28364] poor optimization choices when iterating over a std::string (probably not c++-specific)
- References: <bug-28364-37@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from rakdver at atrey dot karlin dot mff dot cuni dot cz 2006-07-12 23:39 -------
Subject: Re: poor optimization choices when iterating over a std::string
(probably not c++-specific)
> I-cache.
this only matters if this increase in code size will make the code go
out of instruction cache. It definitely is possible to artificially
construct programs where it matters, but I haven't seen one yet (ch
increases the total code size by less than 1% on all the te
> Also, more iterations before the branch predictors figure out what's
> going on.
But also possibly more consistent behavior with respect to branch
prediction, in case the loop is often exited in the first iteration.
In general, it is not possible to determine in ch whether loop header
copying will be profitable or not. Undoing the loop header copying
by some later pass might be doable, although I am not quite sure how
much profitable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28364