GCC 13 vs. Clang 17 Compiler Benchmarks, Early Clang 18 & GCC 14 Development Benchmarks
For those curious about the geometric mean for the benchmarks that successfully ran on all four tested compilers/versions, it ends up being an effective tie. The LLVM Clang x86_64 performance has evolved very well over the years that the performance of the resulting binaries can typically match or exceed GCC. In some benchmarks as shown GCC can still outpace Clang. Overall though Clang remains a very capable alternative to GCC particularly on x86_64 and AArch64 architectures.
Though besides the performance of the resulting binaries, it's obviously important as well in deciding between the compiler to use which one offers better diagnostics for your purposes, the current language support, the compiler license, etc. In any event for those that have been requesting a fresh GCC vs. Clang battle, hopefully you found these numbers insightful for an end-of-year article. It will be interesting to see how both GCC and LLVM/Clang evolve in 2024.
If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal or Stripe tips are also graciously accepted. Thanks for your support.