LLVM Clang 16 vs. GCC 13 Compiler Performance On AMD 4th Gen EPYC "Genoa"

Written by Michael Larabel in Software on 30 May 2023 at 11:42 AM EDT. Page 2 of 6. 12 Comments.
QuantLib benchmark with settings of . Clang 16.0.3 was the fastest.
Crypto++ benchmark with settings of Test: Keyed Algorithms. Clang 16.0.3 was the fastest.
Crypto++ benchmark with settings of Test: Unkeyed Algorithms. GCC 13.1.1 was the fastest.

As we've seen with other processors as well, Clang 16 can perform extremely well against the latest upstream GNU Compiler Collection.

miniBUDE benchmark with settings of Implementation: OpenMP, Input Deck: BM1. GCC 13.1.1 was the fastest.
miniBUDE benchmark with settings of Implementation: OpenMP, Input Deck: BM1. GCC 13.1.1 was the fastest.

But for some workloads, particularly some OpenMP code-bases, even with LLVM libomp for some cases the performance remains better on the GCC side.

SMHasher benchmark with settings of Hash: wyhash. GCC 13.1.1 was the fastest.
SMHasher benchmark with settings of Hash: SHA3-256. Clang 16.0.3 was the fastest.
SMHasher benchmark with settings of Hash: Spooky32. Clang 16.0.3 was the fastest.
SMHasher benchmark with settings of Hash: fasthash32. GCC 13.1.1 was the fastest.
SMHasher benchmark with settings of Hash: t1ha2_atonce. Clang 16.0.3 was the fastest.
SMHasher benchmark with settings of Hash: t1ha0_aes_avx2 x86_64. Clang 16.0.3 was the fastest.

With the SMHasher hash function tester, the results were quite mixed depending upon the particular hashing algorithm whether GCC or Clang emitted the faster code.

Timed MrBayes Analysis benchmark with settings of Primate Phylogeny Analysis. Clang 16.0.3 was the fastest.
LAMMPS Molecular Dynamics Simulator benchmark with settings of Model: 20k Atoms. Clang 16.0.3 was the fastest.
LAMMPS Molecular Dynamics Simulator benchmark with settings of Model: Rhodopsin Protein. Clang 16.0.3 was the fastest.

LLVM/Clang performance has come a long way since its early days.


Related Articles