LLVM Clang 21 Compiler Helping Squeeze More Performance On 5th Gen AMD EPYC "Turin"
- Reference: 0001573639
- News link: https://www.phoronix.com/review/llvm-clang-21-epyc-zen5
- Source link:
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