News: 0001573639

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

LLVM Clang 21 Compiler Helping Squeeze More Performance On 5th Gen AMD EPYC "Turin"

([Software] 79 Minutes Ago 1 Comment)


With [1]LLVM 21.1 having been released last week as the newest half-year feature update to this open-source compiler stack, I have begun benchmarking [2]Clang 21 on a variety of systems for getting a feel for the performance over Clang 20. Eventually it will be extended as well to looking at the Clang 21 performance against GCC and vendor compilers. For some initial Clang 21 benchmarking, here is a look at how the Clang 21 C/C++ compiler is performing on 5th Gen AMD EPYC "Turin" Zen 5 processors compared to the prior release.

Clang 21 brings new optimizations such as for optimizing pointer arithmetic on null pointers more aggressively, fixing x86_64 psABI handling to return CXX records in memory rather than AVX registers, various new C++2c language features, a number of new C2y language features, and a variety of new compiler flags / warnings and other changes. There is also the usual variety of bug fixes, the 256-bit maximum vector register size control from AVX10 was removed following that thankful albeit last minute change from Intel, and many other changes both for Clang 21 and LLVM 21 at large.

For some initial Clang 20 vs. Clang 21 performance benchmarks I built a variety of open-source C/C++ programs on both Clang 20.1.8 and then Clang 21.1.0 for looking at the performance of the resulting binaries. The official Debian/Ubuntu LLVM APT archive packages were used for obtaining both compilers in an easily repeatable manner. The same CFLAGS/CXXFLAGS were maintained during the testing. In a follow-up article will be expanding the scope of this compiler testing to see how Clang 21 is performing relative to GCC and potentially AMD's AOCC vendor compiler as well.

For this initial testing an [3]AMD EPYC 9965 2P "Zen 5" Turin server was used for benchmarking while running Debian 13 with the Linux 6.16 upstream kernel. This testing is quite straight-forward so let's get to the numbers.



[1] https://www.phoronix.com/news/LLVM-21.1-Released

[2] https://www.phoronix.com/search/Clang+21

[3] https://www.phoronix.com/search/EPYC+9965



... the HIGHWAY is made out of LIME JELLO and my HONDA is a barbequeued
OYSTER! Yum!