GCC 4.9 Compiler Optimization Benchmarks For Faster Binaries

Written by Michael Larabel in Software on 14 April 2014. Page 4 of 5. 22 Comments

Compiling ImageMagick failed when using -Ofast but besides that the compile times are proportionally in order with the Apache compilation process results.

Depending upon the compiler optimization levels, the compile time can vary quite a bit, but generally is worthwhile for production builds when it means measurably faster binaries. During the development process, besides building slower, the more-optimized binaries can be more challenging to debug.

The C-Ray multi-threaded ray-tracer tends to be a nice, open-source benchmark for being able to exploit optimizations out of the compiler. With each stepping increase in the optimization level were new performance wins, but when optimizing for size (-Os) the performance was even slower than without any optimizations. C-Ray also benefits from -march=native targeting.

Related Articles