This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Efficacy of optimizations.


kernel_learner wrote:
1. What is the cost/benefit ratio of these optimizations.

The effectiveness of different optimizations is very dependent on the style and substance of the source code; what may be beneficial for one type of program can be detriment to another. Some optimizations only make sense on certain hardware architectures.

2. How do these compiler optimizations interact? i.e. does one
optimization negate the effect of another optimization if done in a
particular order?

I've been studying this very issue, in reference to GCC, using a genetic algorithm to evolve effective optimization options for several different source codes. While I'm not ready to formally publish my findings, I have identifed situations where different options conflict to pessimize code.

The primary reason I haven't published my findings is that the results
are very application-specific. On certain programs, a carefully-selected
set of optimization options will produce faster code than can be
attained with "catch-all" options (-O1, -O2, and -O3). A generalization
of principles, however, still eludes me...

--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing


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