Haswell-Tuned Binaries Are Still Sometimes Faster On AMD Ryzen Than Znver1 Tuning

Written by Michael Larabel in Programming on 21 July 2017 at 07:19 AM EDT. 4 Comments
Yesterday I posted benchmarks of Clang 4 vs. Clang 5 with AMD Ryzen now that LLVM 5 has received the initial AMD Zen "znver1" scheduler model. That scheduler model and improvements to LLVM/Clang 5.0 yielded some performance improvements, but still there are cases where using "-march=haswell" for tuning and running those generated binaries on Ryzen leads to better performance.

Following those fresh benchmarks yesterday, a Phoronix Premium supporter requested some new tests where trying "-march=haswell" on Ryzen. Previously it was found that using the Haswell tuning and its scheduler actually yielded better performance on AMD Zen CPUs than using its own "-march=znver1" tuning, but is that still the case?

Tests were done with the AMD Ryzen 7 1700, MSI B350 TOMAHAWK, 16GB DDR4, 120GB Samsung SSD 840, and Radeon HD 7750 running Ubuntu 17.04 with the Linux 4.12 kernel and LLVM Clang SVN.

Using the LLVM Clang SVN code as of yesterday, which was just after v5.0 was branched, are results of my runs with "-O3 -march=x86-64", "-O3 -march=znver1", and now "-O3 -march=haswell" all from the Ryzen 7 1700 running Ubuntu Linux.

Sure enough, in some tests, using Haswell yielded faster binaries on Ryzen than znver1.

While other tests yielded slight losses.

But sure enough, in some of the tests "-march=haswell" remained faster on Ryzen.

Hopefully we see greater "znver1" tuning for LLVM/Clang 6.0. My fresh GCC 8 development benchmarks on Ryzen will be up shortly.
Related News
About The Author
Author picture

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.

Popular News This Week