LLVM Clang 22 Compiler Performance Largely Unchanged Over Clang 21 On AMD Zen 5
- Reference: 0001615989
- News link: https://www.phoronix.com/review/llvm-clang-22-znver5
- Source link:
So far I haven't yet seen any surprises out of my Clang 22.1 compiler benchmarking on x86_64 hardware. I've tested a few Intel and AMD systems to no major changes. Most of the benchmarks were done thus far from an AMD EPYC 9655P server given its speed with 96 Zen 5 cores and twelve channels of DDR5 memory. So this article has those results comparing the new Clang 22.1.0 to the existing Clang 21.1.8 and Clang 20.1.8 releases. Again, no major surprises though. In some workloads there were some incremental gains but nothing too extreme like we've encountered in LLVM/Clang releases years ago.
These days the LLVM/Clang x86_64 performance of the resulting binaries is largely inline with that of the GCC compiler. Healthy neck-and-neck performance between the two with a few exceptions, but aside from when it comes to supporting new CPU instructions or the occasional new optimization or other target-specific scheduling improvements and the like, the LLVM/Clang performance has largely seemed to plateau in recent releases. But it's a good thing it's caught up over the years to being a viable contender in all aspects to GCC -- not just for the performance of the resulting binaries but also when it comes to building complex codebases like the Linux kernel and other projects. All of the open-source C/C++ software under test was built while the CFLAGS/CXXFLAGS were set to "-march=native -O3 -flto".
[1] https://www.phoronix.com/news/LLVM-Clang-22.1-Released
[2] https://www.phoronix.com/search/Clang+22