An Early Look At GCC 12 Compiler Performance On The Core i9 12900K

Written by Michael Larabel in Software on 23 February 2022. Page 1 of 3. 12 Comments

With GCC 12 now onto stage four meaning that the major feature work is over, I've slowly begun running more tests on the GCC 12 compiler that is due for its stable introduction around April. First up is a look at the Core i9 12900K "Alder Lake" performance on GCC 12 in its near-final form compared to GCC 11.2 as the current stable release from last year.

This is just the first of several GCC 12 focused compiler benchmarks on different systems / processors to come on Phoronix leading up to the release. GCC 11.2.0 and a recent GCC 12.0 snapshot from stage four development was used for testing atop the Core i9 12900K running Ubuntu 22.04 LTS.

GCC 11.2 and GCC 12.0 were benchmarked with CFLAGS/CXXFLAGS set of "-O2" and then again with "-O3 -march=native -flto" for more optimized binaries. A variety of C/C++ benchmarks were carried out under these different configurations.

As is usually the case, the benefit of the newer compiler can vary a lot depending upon the particular codebase.

There were some incremental improvements to see with GCC 12 especially with the native/alderlake targeting given there has been Alder Lake cost table adjustments this cycle along with other compiler optimizations at large.

Related Articles