LLVM Clang 16 vs. GCC 13 Compiler Performance On Intel Raptor Lake

Written by Michael Larabel in Software on 11 May 2023 at 11:00 AM EDT. Page 5 of 5. 35 Comments.
OpenJPEG benchmark with settings of Encode: NASA Curiosity Panorama M34. Clang 16: -O3 -march=native -flto was the fastest.
POV-Ray benchmark with settings of Trace Time. Clang 16: -O3 -march=native -flto was the fastest.
Stockfish benchmark with settings of Total Time. GCC 13.1: -O3 -march=native -flto was the fastest.
MariaDB benchmark with settings of Clients: 128. Clang 16: -O3 -march=native -flto was the fastest.
Google Draco benchmark with settings of Model: Church Facade. GCC 13.1: -O3 -march=native -flto was the fastest.

Overall it was another competitive re-match between these latest open-source compilers on Linux. This round of testing was on the Intel Core i9 13900K "Raptor Lake" while similar testing will happen shortly on an AMD Zen 4 system.

Number Of First Place Finishes benchmark with settings of Wins, 58 Tests.

Out of 58 tests carried out on each compiler, LLVM Clang 16 yielded the fastest performance overall with this "-O3 -march=native -flto" optimized testing. Clang 16 was in first place 81% of the time.

Geometric Mean Of All Test Results benchmark with settings of Result Composite, LLVM Clang 16 vs. GCC 13 Raptor Lake. Clang 16: -O3 -march=native -flto was the fastest.

When taking the geometric mean of all the raw performance metrics, Clang 16 was faster than GCC 13 overall by about 6% on this Intel Raptor Lake system running Fedora Workstation 38. Stay tuned for similar benchmarks on AMD Zen 4.

Let us know in the forums what your experience has been if evaluating different compilers for your own code-base. Of course, binary size, build time, features, compiler diagnostics, and other factors also play an important role in deciding between compilers for production purposes. In any case it's great to see the continued friendly performance competition between Clang and GCC.

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.


Related Articles
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.