LLVM Clang 22 Compiler Performance Largely Unchanged Over Clang 21 On AMD Zen 5
([Software] 3 Hours Ago
Add A Comment)
- Reference: 0001615989
- News link: https://www.phoronix.com/review/llvm-clang-22-znver5
- Source link:
With [1]yesterday's stable release of the LLVM Clang 22 compiler it didn't take long for Phoronix readers to begin asking about the performance of this half-year feature update to this prominent open-source C/C++ compiler. What I am seeing so far are no big surprises with the performance largely being similar to Clang 21 across various open-source C/C++ workloads in the testing thus far. This initial round of reference benchmark results between LLVM [2]Clang 22 , Clang 21, and Clang 20 were done on an AMD EPYC Turin (Zen 5) Linux server.
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
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