Results 1 to 5 of 5

Thread: Compiler flag benchmarks

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Location
    Europe
    Posts
    401

    Default Compiler flag benchmarks

    One thing that fascinates me is how few studies actually compare the effects of compiler flag settings. -O, -O2 and -O3 are known to most Linux users, but there are many many other flags.

    Apparently the results differ if the OS and/or the compiler themselves have been compiled using them!

    There are a few older tests around on the net, but I haven't seen any new tests for at least three or four years. And Ii have lost my links to the older tests.

    It would be nice to have an overview of what effect these gcc compiler flags have on the newer CPUs,

    While there is an immense number permutations involved in such a test I recall one which randomized the settings and had some ... Ah, I found a similar (the same?) link: http://www.coyotegulch.com/products/acovea/


    Thanks for considering it!

    EDIT The ACOVEA was the one I thought of, and it is published under the GNU General Public License (GPL).
    Last edited by sabriah; 07-04-2008 at 02:46 PM.

  2. #2
    Join Date
    May 2007
    Location
    Third Rock from the Sun
    Posts
    6,584

    Default

    Quote Originally Posted by sabriah View Post
    One thing that fascinates me is how few studies actually compare the effects of compiler flag settings. -O, -O2 and -O3 are known to most Linux users, but there are many many other flags.

    Apparently the results differ if the OS and/or the compiler themselves have been compiled using them!

    There are a few older tests around on the net, but I haven't seen any new tests for at least three or four years. And Ii have lost my links to the older tests.

    It would be nice to have an overview of what effect these gcc compiler flags have on the newer CPUs,

    While there is an immense number permutations involved in such a test I recall one which randomized the settings and had some ... Ah, I found a similar (the same?) link: http://www.coyotegulch.com/products/acovea/


    Thanks for considering it!

    EDIT The ACOVEA was the one I thought of, and it is published under the GNU General Public License (GPL).

    That would be pretty long article as every CPU has it's own aggresive flags. Add onto that the different compilers and performance libraries, you could in the end write a book.

  3. #3
    Join Date
    Aug 2007
    Location
    Europe
    Posts
    401

    Default

    Quote Originally Posted by deanjo View Post
    That would be pretty long article as every CPU has it's own aggresive flags. Add onto that the different compilers and performance libraries, you could in the end write a book.
    Exactly! That is why ACOVEA may be an option.


    From http://en.gentoo-wiki.com/wiki/HOWTO_Acovea

    The GNU Compiler Collection (GCC) compiles the C or C++ code that it is given into machine code that is understandable to the processor. In doing this there are many choices the compiler is faced with. There are many different ways of implementing various control structures in machine code. GCC has some standard setting that aren't too bad at all - but in most cases not quite optimal. The various flags offered by the compiler (there are about 30 of them) are enigmatic even to gcc developers. Nobody knows exactly which flags influence compile time and runtime or in which way.

    With 30 different flags available testing all of them would be impossible. This is where acovea comes in handy. It uses a so called genetic algorithm to find the optimal flags for each individual system.
    [edit] Genetic Algorithms

    For more details of course you should read Scott's page mentioned earlier. If you're really interested in the theory then I must recommend the excellent book "The Blind Watchmaker" by Richard Dawkins. After understanding his book you will understand why a genetic algorithm is suited to this kind of complex problem. Be warned however that just in the same way as evolutions has taken millions of years up to date, running acovea is highly processor intensive. Expect one iteration to take well over 24 hours with an Athlon-XP / Pentium 4.
    I used to run Gentoo years ago, which is (maybe) how I stumbled into it. I honestly don't remember. It is, however, more likely that wild surfing was the reason.

    [EDIT1: updated link to ACOVEA article]
    .
    Last edited by sabriah; 12-14-2009 at 07:16 AM.

  4. #4
    Join Date
    May 2007
    Location
    Third Rock from the Sun
    Posts
    6,584

    Default

    Quote Originally Posted by sabriah View Post
    Exactly! That is why ACOVEA may be an option.

    From http://gentoo-wiki.com/HOWTO_Acovea



    I used to run Gentoo years ago, which is (maybe) how I stumbled into it. I honestly don't remember. It is, however, more likely that wild surfing was the reason.


    .
    Sure but ACOVEA is pretty much outdated with each new release of processor or instruction set.

  5. #5
    Join Date
    Aug 2007
    Location
    Europe
    Posts
    401

    Default

    Quote Originally Posted by deanjo View Post
    Sure but ACOVEA is pretty much outdated with each new release of processor or instruction set.
    I thought they added new on top of the old instructions. They don't replace them. Surely, SSE2 is still valid?

    Still, ANY optimization and/or benchmark is pretty much outdated with each new release of processor. Isn't that pretty much the essence of it, updating benchmarks and optimizations?

    .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •