GCC 10 vs. Clang 10 Compiler Performance On AMD Zen 2 + Intel Cascade Lake

Written by Michael Larabel in Software on 19 May 2020 at 10:40 AM EDT. Page 1 of 5. 7 Comments.

We delivered many benchmarks of Clang 10.0 on various CPUs following that updated LLVM compiler stack release earlier this year. With GCC 10 released earlier this month, we have begun our benchmarking of this annual feature release to the GNU Compiler Collection. First up is a look at the GCC 9 vs. GCC 10 vs. LLVM Clang 10 compiler performance on AMD Zen 2 and Intel Cascade Lake systems.

This initial round of benchmarking for GCC 10 vs. Clang 10 is looking at the release builds of each plus GCC 9.3 when testing on AMD Ryzen Threadripper 3990X and Intel Core i9 10980XE workstations. The Threadripper 3990X is running out of the System76 Thelio Major. Both systems were running Ubuntu 20.04 LTS with the Linux 5.4 kernel and all the compilers were built in the same release mode manner. There are RAM/SSD differences between the systems with not intending to compare the AMD vs. Intel performance but rather looking at how these LLVM Clang and GCC compilers are performing across multiple CPU families. Additional CPU benchmarks will be forthcoming with these compilers.

During all of the benchmarking, the CFLAGS/CXXFLAGS were set to "-O3 -march=native" for both the AMD Zen 2 and Intel Cascade Lake systems. Via the Phoronix Test Suite a wide range of C/C++ benchmarks were run while rebuilding the open-source benchmarks under each of the different compilers being tested.

With the Blosc compressor, the Clang 10.0 performance was basically tied with GCC 10 while the Core i9 10980XE performance saw GCC delivering better performance than this latest Clang release.

With the Crypto++ benchmarks there wasn't much of a difference between GCC 9.3 to GCC 10.1 while the Clang 10.0 performance continued to trail GCC on the Cascade Lake HEDT system. On the Threadripper Thelio Major system the Clang performance tended to run well against GCC with the exception of the integer and elliptic curve public key algorithms test where GCC came out measurably stronger.

LCZero with its Eigen back-end saw some minor gains out of GCC 10 and even better performance with Clang 10 while the i9-10980XE system saw slightly faster performance on GCC 9.3.

Clang's LAMMPS binary performance was in line with GCC on both systems.

Related Articles