GCC 14 vs. LLVM Clang 18 Compiler Performance On Fedora 40

Written by Michael Larabel in Software on 24 April 2024 at 11:02 AM EDT. Page 5 of 5. 34 Comments.
Coremark benchmark with settings of CoreMark Size 666, Iterations Per Second. GCC 14.0.1 20240411 was the fastest.
Stargate Digital Audio Workstation benchmark with settings of Sample Rate: 96000, Buffer Size: 1024. Clang 18.1.1 was the fastest.
Stargate Digital Audio Workstation benchmark with settings of Sample Rate: 192000, Buffer Size: 1024. Clang 18.1.1 was the fastest.
C-Ray benchmark with settings of Total Time, 4K, 16 Rays Per Pixel. GCC 14.0.1 20240411 was the fastest.
Primesieve benchmark with settings of Length: 1e13. GCC 14.0.1 20240411 was the fastest.
FLAC Audio Encoding benchmark with settings of WAV To FLAC. Clang 18.1.1 was the fastest.
Opus Codec Encoding benchmark with settings of WAV To Opus Encode. Clang 18.1.1 was the fastest.
Helsing benchmark with settings of Digit Range: 14 digit. GCC 14.0.1 20240411 was the fastest.
RNNoise benchmark with settings of Input: 26 Minute Long Talking Sample. Clang 18.1.1 was the fastest.
OpenSSL benchmark with settings of Algorithm: SHA256. GCC 14.0.1 20240411 was the fastest.
OpenSSL benchmark with settings of Algorithm: SHA512. Clang 18.1.1 was the fastest.
OpenSSL benchmark with settings of Algorithm: ChaCha20. GCC 14.0.1 20240411 was the fastest.
OpenSSL benchmark with settings of Algorithm: ChaCha20-Poly1305. GCC 14.0.1 20240411 was the fastest.
OpenSSL benchmark with settings of Algorithm: AES-256-GCM. GCC 14.0.1 20240411 was the fastest.
Liquid-DSP benchmark with settings of Threads: 64, Buffer Length: 256, Filter Length: 512. Clang 18.1.1 was the fastest.
GROMACS benchmark with settings of Implementation: MPI CPU, Input: water_GMX50_bare. GCC 14.0.1 20240411 was the fastest.
OpenVINO benchmark with settings of Model: Person Detection FP16, Device: CPU. GCC 14.0.1 20240411 was the fastest.
OpenVINO benchmark with settings of Model: Vehicle Detection FP16-INT8, Device: CPU. GCC 14.0.1 20240411 was the fastest.
OpenVINO benchmark with settings of Model: Machine Translation EN To DE FP16, Device: CPU. GCC 14.0.1 20240411 was the fastest.
OpenVINO benchmark with settings of Model: Noise Suppression Poconet-Like FP16, Device: CPU. GCC 14.0.1 20240411 was the fastest.

Across the wide range of workloads tested, there's a healthy mix of wins for each of these open-source compilers. Ultimately though it comes down to what codebases and other factors are most important to you personally as well as each compiler's debugging facilities and other features to consider besides just the performance of the resulting binaries. These ongoing benchmarks do show the continued viability of LLVM Clang as an alternative to GCC for most Linux distribution uses.

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

Out of 130 tests in total, GCC 14.0.1 was the fastest in 55% of the tests.

Geometric Mean Of All Test Results benchmark with settings of Result Composite, GCC 14 vs. Clang 18, AMD Ryzen Threadripper 7980X. GCC 14.0.1 20240411 was the fastest.

But the wins often were quite close as confirmed by taking the geometric mean of all the data points: it's a dead heat between GCC and Clang at least for this AMD Ryzen Threadripper 7980X workstation running Fedora Workstation 40. Those wanting to go through all 130 data points in full can do so via this result page.

Stay tuned for more GCC 14 benchmarks coming soon with the GCC 14.1 stable release fast approaching.

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.