473,699 Members | 2,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

An Evolutionary Analysis of GNU C Optimizations

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
2 2854
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
2188
by: Peter MacKenzie | last post by:
Hello, I'm Peter, and I'm very much a newbie. New in the sense of being a novice at everything to do with programming, rather than just new to Python, so please be very explicit in your replies (should you deem me worth of such attention). I've long had a passing interest in programming from a macro-conceptual level, but only very recently have I tried to learn the details of how to impliment my ideas in code. Since I'm so...
1
1312
by: VM | last post by:
Does Studio Dot Net include any optimizations that make it the appropriate tool for Pentium 4 processors? I'm writing a paper on compiler optimizations for modern hardware. Since I chose .Net as my main tool, I was looking for some sites that explain some of the optimizations .Net may have that will make it more compatible with modern hardware. I'm also looking for info on the differences between traditional compilers and the Dot Net...
0
415
by: Scott Robert Ladd | last post by:
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...
8
1783
by: Scott Robert Ladd | last post by:
Hello, I've posted a comparison of recent GCC versions (3.3, 3.4, and the coming 4.0) with Intel C++ 8.1, including several benchmarks and "state-of-the-product" reviews. You can find the article at: http://www.coyotegulch.com/reviews/linux_compilers/ The above article replaces an older article I published in late 2002. This new comparison marks what I hope will be an ongoing series that tracks the
1
1651
by: VM | last post by:
Hello, I'm looking for information on C# compiler optimization or compilation for an engineering short paper I want to write. Any sites with some technical info on the new advances of C# compilation would be greatly appreciated. Any sites that have comparisons between C# compilation an any other language would be even better. My email is : MYERSV at GO dot COM
1
1650
by: Hareth | last post by:
VS2003: In the properties of the solution, their is a checkbox that lets you "enable optimizations". What are the pos & the neg?
9
3426
by: Edmund Dengler | last post by:
Greetings! Just trying some tests out, and wanted to know about some optimizations. If I do a CHECK constraint on a table, is this used to optimize a SELECT or does Postgresql rely mostly on normal index search? For example, I want to create some tables to manage different data in a kind of <object, relationship, object2> manner, but where object2 could be an IP address, text, a number, etc. So I thought of doing the following:
29
1910
by: sammy | last post by:
Word up! If there are any gcc users here, maybe you could help me out. I have a program and I've tried compiling it with -O2 and -O3 optimization settings. The wired thing is that it actually runs faster with -O2 than with -O3, even though -O3 is a higher optimization setting. Have I found a bug in gcc? Could I be doing something wrong?
0
1107
by: tmh | last post by:
C++ optimizations (general) http://tmh-coding-tips.blogspot.com/2008/09/cc-c-optimizations-general.html C++ optimizations for initialization http://tmh-coding-tips.blogspot.com/2008/09/cc-c-optimizations-for-initialization.html C++ optimizations for loops, if/else and switch/case statements http://tmh-coding-tips.blogspot.com/2008/09/cc-c-optimizations-for-loops-ifelse-and.html C/C++ Tutorials
0
8687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9035
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8914
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8884
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2009
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.