GCC 12 Compiler Optimization Tuning With The AMD Ryzen Threadripper 3990X
Those wishing to see even more of these GCC 12 Threadripper compiler optimization tuning benchmarks can see this OpenBenchmarking.org result page for the entire batch of data.
When taking the geometric mean of all the results, going from the common -O2 to -O3 yielded a 6% increase overall. The "-march=native" tuning on top of -O3 was around an additional 2% increase overall but largely comes down to the particular code-base / software for the level of improvement from native CPU instruction tuning. The -flto results continue to impress and be of great benefit. With recent GCC (and Clang) releases link-time optimizations have been relatively stable and have had less build issues and other headaches compared to years prior with long ago compiler releases that sometimes were having issues coping with LTO. With that more Linux distributions have thankfully begun building their packages with link-time optimizations where relevant.
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.