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 2 of 5. 35 Comments.
QuantLib benchmark with settings of . Clang 16: -O3 -march=native -flto was the fastest.

Starting things off with the QuantLib quantitative finance software, the Clang-built library was about 6% faster than GCC 13.1.

Crypto++ benchmark with settings of Test: Unkeyed Algorithms. Clang 16: -O3 -march=native -flto was the fastest.

In the case of the Crypto++ library, Clang still led -- albeit slightly with just a 16% lead over GCC 13.1.

SMHasher benchmark with settings of Hash: t1ha0_aes_avx2 x86_64. GCC 13.1: -O3 -march=native -flto was the fastest.

GCC 13.1 did see slightly better performance with SMHasher. (Note it's build system applies slightly diferent LTO parameters based on the underlying compiler.)

Timed MrBayes Analysis benchmark with settings of Primate Phylogeny Analysis. Clang 16: -O3 -march=native -flto was the fastest.
Timed HMMer Search benchmark with settings of Pfam Database Search. Clang 16: -O3 -march=native -flto was the fastest.

While with the MrBayes and HMMer molecular biology software packages, Clang 16 yielded slightly faster binaries.

Zstd Compression benchmark with settings of Compression Level: 12, Compression Speed. Clang 16: -O3 -march=native -flto was the fastest.
Zstd Compression benchmark with settings of Compression Level: 12, Decompression Speed. Clang 16: -O3 -march=native -flto was the fastest.
Zstd Compression benchmark with settings of Compression Level: 19, Compression Speed. Clang 16: -O3 -march=native -flto was the fastest.
Zstd Compression benchmark with settings of Compression Level: 19, Decompression Speed. Clang 16: -O3 -march=native -flto was the fastest.
Zstd Compression benchmark with settings of Compression Level: 19, Long Mode, Compression Speed. Clang 16: -O3 -march=native -flto was the fastest.
Zstd Compression benchmark with settings of Compression Level: 19, Long Mode, Decompression Speed. Clang 16: -O3 -march=native -flto was the fastest.

When looking at the Zstandard compression performance when Zstd was built under the compilers, it was neck-and-neck competition here depending upon the particular compression settings.


Related Articles