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 1 of 6. 12 Comments.

With the recent stable releases of LLVM's Clang 16 and GCC 13 compilers there is now initial AMD Zen 4 "znver4" support in these open-source compilers. Curious about the performance difference between these two compilers on the very newest AMD 4th Gen EPYC "Genoa" server processors, I ran some LLVM Clang 16.0 and GCC 13.1 benchmarks on the flagship EPYC 9654 2P Linux server.

GCC and Clang have been offering robust and healthy competition between these two leading open-source compilers for a number of years now. The healthy competition has been just not around the performance of the resulting binaries but also the compiler debugging/diagnostics, build times, and other features. On Intel and AMD x86_64 platforms, the Clang and GCC performance has been quite even in recent times -- much better than when I was testing Clang's performance during its early days more than one decade ago.

For today's benchmarking the AMD EPYC 9654 2P server using the reference Titanite server platform was running the newly-released Fedora Server 38. which has both GCC 13.1.1 and LLVM Clang 16.0 compilers available in its repository. Fedora Server 38 has been running great on AMD EPYC Genoa and especially with Fedora's more liberal updates around kernel versions, etc, is a great choice for running on modern hardware platforms.

AMD EPYC Genoa Compilers

With this Clang 16 and GCC 13.1 compiler benchmarking, the focus was on looking at the performance of the resulting open-source C/C++ applications/benchmarks under these open-source benchmarks. A follow-up article will also toss the Clang-based AMD Optimizing C/C++ Compiler into the mix while today's article is just focused on these popular open-source compiler choices. Throughout all testing on both compilers the CFLAGS/CXXFLAGS were set to "-O3 -march=native -flto" for looking at the optimized compiler builds catering to the AMD Zen 4 microarchitecture.


Related Articles