Ryzen Compiler Performance: Clang 4/5 vs. GCC 6/7/8 Benchmarks

Written by Michael Larabel in Software on 23 July 2017. Page 1 of 6. 21 Comments

A few days back I posted some fresh AMD Ryzen compiler benchmarks of LLVM Clang now that it has its new Znver1 scheduler model, which helps out the performance of Ryzen on Linux with some of the generated binaries tested. But it was found still that Haswell-tuned binaries are sometimes still faster on Ryzen than the Zen "znver1" tuning itself. For continuing our fresh compiler benchmarks from AMD's new Ryzen platform, here are the latest GCC numbers.

GCC 8.0 remains under heavy development for release next year and for this article we were benchmarking with the 20170716 snapshot while building GCC 8.0.0 (and the other tested compilers) in release form. The GCC 8.0.0 performance on Ryzen was compared to GCC 7.1.0 and then GCC 6.3.0, as currently offered on Ubuntu 17.04. Those GNU Compiler Collection results were then compared to our latest LLVM Clang 4.0 and LLVM Clang 5.0 SVN results.

With all five compilers, they were tested both when the CFLAGS were set to "-O3 -march=x86-64" and then again with "-O3 -march=znver1" to compare the impact of targeting generic x86_64 binaries versus the Zen (znver1) tuning. All of the tests were done from my AMD Ryzen 7 1700 test system running Ubuntu 17.04 64-bit with the Linux 4.12 kernel.

All of these AMD Linux compiler benchmarks were carried out in a fully-automated and reproducible manner using the open-source Phoronix Test Suite benchmarking software.

Related Articles