GCC 4.9 Compiler Optimization Benchmarks For Faster Binaries

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

GraphicsMagick's Blur test saw a huge improvement in performance from having no optimizations to the basic optimize level. Aside from the size optimizations and debug experience optimizations slowing down things compared to the basic optimize level, for the blur operation with this open-source imaging program there wasn't much more to see.

With GraphicsMagick's Sharpen task there was the improvement when hitting -O1 but no greater benefit through -O3 or -Ofast, and -Os and -Og still being slower than -O1 for those caring more about binary size and the debugging experience, respectively. The sharpen code though did see some performance gains when passing -march=native to generate code for this latest-generation Intel CPU. Going from best case to worst case when toggling the compiler flags was a 2.59x difference in performance.

The basic optimize level caused the image resizing performance within GraphicsMagick to nearly double, but there wasn't much else to see beyond that. Link-time optimizations weren't doing much in these benchmarks.

Related Articles