By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,778 Members | 1,919 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,778 IT Pros & Developers. It's quick & easy.

An Evolutionary Analysis of GNU C Optimizations

P: n/a
I've just posted my analysis of GNU C and C++ optimizations, using a
genetic algorithm to discover the most effective optimization flags for
different algorithms.

ACOVEA (Analysis of Compiler Options via Evolutionary Algorithm)
implements a genetic algorithm to find the "best" options for compiling
programs with the GNU Compiler Collection (GCC) C and C++ compilers.
"Best", in this context, is defined as those options that produce the
fastest executable program from a given source code. Acovea is a C++
framework that can be extended to test other programming languages and
non-GCC compilers.

I envision Acovea as an optimization tool, similar in purpose to
profiling. Traditional function-level profiling identifies the algorithms
most influential in a program's performance; Acovea is then applied to
those algorithms to find the compiler flags and options that generate the
fastest code. Acovea is also useful for testing combinations of flags for
pessimistic interactions, and for testing the reliability of the compiler.

You'll find the full article, and links for downloads, at:

http://www.coyotegulch.com/acovea/index.html

Enjoy.

...Scott

--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing
In development: Alex, a database for common folk

Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Scott Robert Ladd wrote:
I've just posted my analysis of GNU C and C++ optimizations, using a
genetic algorithm to discover the most effective optimization flags for
different algorithms.


You could have cross-posted, you know...

Jul 22 '05 #2

P: n/a
Scott Robert Ladd wrote:
I've just posted my analysis of GNU C and C++ optimizations, using a
genetic algorithm to discover the most effective optimization flags for
different algorithms.

ACOVEA (Analysis of Compiler Options via Evolutionary Algorithm)
implements a genetic algorithm to find the "best" options for compiling
programs with the GNU Compiler Collection (GCC) C and C++ compilers.
"Best", in this context, is defined as those options that produce the
fastest executable program from a given source code. Acovea is a C++
framework that can be extended to test other programming languages and
non-GCC compilers.

I envision Acovea as an optimization tool, similar in purpose to
profiling. Traditional function-level profiling identifies the algorithms
most influential in a program's performance; Acovea is then applied to
those algorithms to find the compiler flags and options that generate the
fastest code. Acovea is also useful for testing combinations of flags for
pessimistic interactions, and for testing the reliability of the compiler.

You'll find the full article, and links for downloads, at:

http://www.coyotegulch.com/acovea/index.html


Nit :

you write:

-finline-limits=nnn

it is:

-finline-limit=N (note the missing "s")

Unfortunately this one sometimes has huge impact on performance and
changes in meaning from release to release. In some cases inlining can
actually eliminate alot of code and when it's successful huge swaths of
code disappear. But sometimes you need to set it so high that some of
the code fails to finish compiling (gets stuck in some infinite loop) !
This is definitly a weakness with gcc.

Cool - I read about GA once - is this somthing we can bundle up as part
of a unit test - sort of a build-step in my Makefile ? That would be cool.

G

Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.