Benchmarking The New Optimization Level In GCC 4.8
The -Og level did better than -O0 and -Os for the lightweight path-tracer.
The -Og optimization level introduced in GCC 4.8 does much better than -O0 for the resulting binary performance while still making it possible to debug the binary and produce expected results. As the testing also showed, the compilation time is (obviously) increased due to some optimizations being applied. The -O3 level or similar tuned compiler options should be used by software vendors when deploying release binaries while initial testing on -Og shows it to be interesting for producing higher-performing debug builds while at a slight cost to the compilation time.
If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal or Stripe tips are also graciously accepted. Thanks for your support.
