GCC Compiler Tests At A Variety Of Optimization Levels Using Clear Linux
Written by Michael Larabel in Software on 27 March 2017. Page 1 of 4. 47 Comments

For those curious about the impact of GCC compiler optimization levels, a variety of benchmarks were carried out using GCC 6.3 on Intel's Clear Linux platform.

We've done it before, but with GCC continuing to advance, here are some fresh compiler benchmarks. New to this round of testing is also more tests looking at the compile time impact as well as the binary size difference. Aside from the test profiles dedicated to measuring the install time of a particular program, a new module in the Phoronix Test Suite allows generating compile time graphs for any of the test profiles.

With the Phoronix Test Suite being standardized and fully-automated and already tracking how long it takes to install a given test, it was an easy addition. This additional data can be accessed by setting the INSTALL_TIMES_ARE_A_BENCHMARK=1 environment variable prior to running the Phoronix Test Suite. Similarly, there is also a INSTALL_SIZES_ARE_A_BENCHMARK=1 environment variable too. When that is set, it will report the overall size of the test installation directory. It's important to note that it's not just the binary size generated by GCC, due to the Phoronix Test Suite approach being universal, it's the overall size of the test install directory. But in this testing with only changing out the compiler flags, you can see the change in resulting binary size. Those wishing to extend this PTS module functionality or make other improvements can find this simple module on GitHub. The support will be found in the upcoming Phoronix Test Suite 7.0.1 release.

Intel's Clear Linux was used for benchmarking with a Core i7 6800K system. GCC 6.3.0 was tested with the flags of -Os, -Og, -O0, -O0 -march=native, -O1 -march=native, -O2 -march=native, -O3, -O3 -march=native, and -Ofast -march=native. Once GCC 7.1 is officially released, there will be similar tests there. All of these benchmarks were carried out in a fully-automated manner using the open-source Phoronix Test Suite benchmarking software.



Related Articles
Trending Linux News