AMD Zen 2 Performance Looking Even Better With GCC 10

Written by Michael Larabel in Software on 2 August 2019 at 10:26 AM EDT. Page 1 of 5. 22 Comments.

While this year's GCC 9 compiler release brought initial support for AMD Zen 2 processors with the Znver2 target, the support was sadly incomplete. While the GCC 9 support added some of the new instructions, it wasn't complete (such as RDPRU support remains missing) and the cost tables and scheduler model were not updated from Znver1 to account for the microarchitectural changes. Thankfully, SUSE's compiler experts recently fixed up this support for the GCC 10 compiler and more recently were able to get it back-ported for the upcoming GCC 9.2 for the Linux distributions that will upgrade to that point release. Here are some benchmarks looking at the performance impact of that updated AMD Zen 2 compiler code.

This round of compiler benchmarking was done on an AMD Ryzen 9 3900X system running Ubuntu 18.04 LTS with the Linux 5.3 kernel. The compiler versions tested were GCC 9.1.0 stable and then GCC 10.0.0 using the latest development code as of 27 July. Each compiler was tested with the generic "-O3" CFLAGS/CXXFLAGS and then again when targeting the Zen 2 optimizations with "-O3 -march=znver2" for seeing if/how-much these Zen 2 optimizations are paying off both in the initial Znver2 support on GCC 9 and looking ahead to GCC 10.

Ryzen 9 3900X Znver2 Compiler Tuning

Via the Phoronix Test Suite a range of C/C++ benchmarks were carried out for looking at the performance impact of the generated binaries from GCC 9 vs. GCC 10 and for the Znver2 tuning.


Related Articles