openSUSE Tumbleweed's GCC 12 Upgrade Helping Performance In Some Areas

Written by Michael Larabel in Operating Systems on 20 May 2022 at 12:18 PM EDT. Page 1 of 1. 6 Comments.

Last week the rolling-release openSUSE Tumbleweed switched to the new GCC 12 as the default system compiler and rebuilt its package set under this annual feature upgrade to the GNU Compiler Collection. For those curious here are some benchmarks before and after that GCC 12 transition for openSUSE Tumbleweed.

Last week's openSUSE Tumbleweed 20220510 snapshot switched to the GCC 12 compiler with a complete rebuild of the OS packages. GCC 12 brings many new features from improved C / C++ / Ada language support to features on new/upcoming CPUs like AVX-512 FP16, OpenMP and OpenACC enhancements, JIT enhancements, useful debug improvements, and much more. There are also various performance optimizations from small changes up to more notable items like vectorization now being enabled at the "-O2" optimization level with the very-cheap cost model.

Curious about the OS performance implications for GCC 12 and fortunately having had an openSUSE Tumbleweed 20250507 installation just prior to the transition, I ran some before/after benchmarks for seeing the impact of the new compiler in various open-source benchmarks built from source as well as the performance from having all the operating system packages rebuilt under this new compiler.

openSUSE Tumbleweed   GCC12 Benchmarks

This testing was on an Intel Xeon Platinum 8380 2P "Ice Lake" server. No other changes were made to the system during the testing besides the upgrade from the openSUSE Tumbleweed 20220507 to 20220510 state and rebuilding the relevant benchmarks between testing.

openSUSE Tumbleweed   GCC12 Benchmarks

Out of over 100 tests carried out, the GCC12-based openSUSE Tumbleweed was about a 1.6% improvement overall than the state of openSUSE Tumbleweed from just a few days prior...

openSUSE Tumbleweed   GCC12 Benchmarks

This side-by-side view is a look at the benchmarks where there was a statistically significant difference in either way. As shown by this, in a number of specific areas there were very healthy improvements to find with openSUSE Tumbleweed on GCC 12. Tumbleweed's Python rebuilt under GCC 12 in particular seems to be a big win (presumably due to the -O2 vectorization default, perhaps). Besides very strong Python performance improvements, the Liquid-DSP software defined radio digital signal processing library performed much better built under GCC 12, Microsoft's ONNX Runtime built under GCC 12 was experiencing uplifts with some models, and some of the Java benchmarks with OpenJDK being rebuilt under GCC 12 were of benefit.

There were just a few regressions seen affecting Stress-NG, AVIF image encode, and a few other select areas by mostly small amounts.

openSUSE Tumbleweed   GCC12 Benchmarks

The Python performance was most significant with close to 9% better performance overall when Tumbleweed's Python 3 was rebuilt under GCC 12 rather than GCC 11. This spanned the Python benchmarks like Numpy, PyBench, and PyPerformance.

openSUSE Tumbleweed   GCC12 Benchmarks

For many of the heavy HPC benchmarks like Incompact3D Xcompact3D, LAMMPS, and GROMACS led to around 2% better performance overall.

Those wanting to go through all 100+ tests in full between these openSUSE Tumbleweed revisions switching from GCC 11 to GCC 12, see this OpenBenchmarking.org result page. From my testing of GCC 12 on Tumbleweed, Fedora 36, Clear Linux, and built on other platforms this annual major release of the GNU Compiler Collection is performing quite solid and well. There are performance improvements in some areas but also the improved diagnostics, C2X and C++23 improvements, and other enhancements make this a meaningful compiler update.

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.

Related Articles
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.