To demonstrate this I've put together a trivial prime-number factoring program. After compiling the code with a given set of compiler flags, and timing the result, the best results will be kept and "bred" together. In short if you have a suitable program you can expect to return many hours later with a faster program with no human involvement. The first thing we need to do is load a "profile". Genetic algorithms have fascinated me for years, and one interesting project I've always been vaguely curious about is the research-based acovea tool.
Uploader: | Zolokora |
Date Added: | 2 June 2015 |
File Size: | 68.86 Mb |
Operating Systems: | Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X |
Downloads: | 46007 |
Price: | Free* [*Free Regsitration Required] |
That is a pretty astonishing result, zcovea one we could have probably replicated via a better algorithm in the first place. Recompiling the code manually using the suggested flags yielded an execution time of 7.
Here we'll look at an interesting alternative - optimising via compiler flags. We'll start by installing the appropriate package:. Optimizing code via compiler flags Posted by Steve on Mon 12 Sep at To demonstrate this I've put together a trivial prime-number factoring program.
Index of /ubuntu/pool/universe/a/acovea
Genetic algorithms have fascinated me for acocea, and one interesting project I've always been vaguely curious about is the research-based acovea tool. Given that you must compile and execute the benchmark many times you can't expect speed which is a potential downside.
Posted by Anonymous Trademarks are caovea property of their respective owners. Posted by jiteo Given a small benchmark program which is a current bottleneck in your code this tool will recompile it over and over and over again, with different compiler flags. Debian is a registered trademark of Software in the Public Interest, Inc. For this acoeva to be useful I expect you'll need to be writing code which is CPU-bound in some fashion, but which is still simple enough to condense into a useful benchmark.
Optimizing code via compiler flags
It's still a nifty idea - I enjoyed reading this. No code changes, yet the program became faster by 2 seconds. That's a good point.
The execution time on your system may be different, but for me a simple execution took 9. Posted by Steve As I'm running on an Intel host I started the process by executing:.
Index of /pub/Linux/gentoo-portage/app-benchmarks/acovea/
Do you have the numbers for that? That kinda ruins my happy happy joy joy moment! When you're developing performance-critical code you will most likely receive performance increases in one of two ways; via the selection of the most appropriate algorithmic solution, or via the expense of additional hardware.
Articles and comments are the property of their respective posters. Although I think the article afovea mis-titled. With no tweaks to the number of population sizes, generations, or similar this compilation and benchmarking effort took acoeva of a day.
Once installed we can then start working. A profile is a simple XML file which describes the available compiler flags which may be tested - so you could update the tool to work with Intels icc compiler, for example. As you can see it has managed to generate a simply horrifically large compile command - with many options I've never seen before. Copyright Steve Kemp After compiling the code with a given set of compiler flags, adovea timing the result, the best results will be kept and "bred" together.
If you have to "simplify" your real code to make it worth trying acovea on it you might find the suggested results just don't apply to the real thing. The first thing we need to do is load a "profile". Now lets make it faster. It's not so much about optimizing code with compiler flags using -O3 is optimizing code with compiler flagsit's about using genetic algorithms to figure out what compiler flags to use.
The "-O3" version is almost as acoveq as the acovea result.
No comments:
Post a Comment