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 3 of 5. 35 Comments.
JPEG XL libjxl benchmark with settings of Input: PNG, Quality: 90. Clang 16: -O3 -march=native -flto was the fastest.
JPEG XL libjxl benchmark with settings of Input: JPEG, Quality: 90. Clang 16: -O3 -march=native -flto was the fastest.
JPEG XL libjxl benchmark with settings of Input: PNG, Quality: 100. Clang 16: -O3 -march=native -flto was the fastest.
JPEG XL libjxl benchmark with settings of Input: JPEG, Quality: 100. Clang 16: -O3 -march=native -flto was the fastest.

The JPEG-XL library applied slightly different build flags based on the underlying compiler detected but overall LLVM Clang was coming out noticeably faster than GCC on this Intel Raptor Lake system.

TSCP benchmark with settings of AI Chess Performance. Clang 16: -O3 -march=native -flto was the fastest.

The TSCP chess program also saw more favorable performance when built with Clang.

GraphicsMagick benchmark with settings of Operation: Swirl. Clang 16: -O3 -march=native -flto was the fastest.
GraphicsMagick benchmark with settings of Operation: Rotate. GCC 13.1: -O3 -march=native -flto was the fastest.
GraphicsMagick benchmark with settings of Operation: Sharpen. Clang 16: -O3 -march=native -flto was the fastest.
GraphicsMagick benchmark with settings of Operation: Enhanced. Clang 16: -O3 -march=native -flto was the fastest.
GraphicsMagick benchmark with settings of Operation: Resizing. Clang 16: -O3 -march=native -flto was the fastest.
GraphicsMagick benchmark with settings of Operation: Noise-Gaussian. GCC 13.1: -O3 -march=native -flto was the fastest.
GraphicsMagick benchmark with settings of Operation: HWB Color Space. Clang 16: -O3 -march=native -flto was the fastest.

The OpenMP Graphics-Magick performance was mixed based on the particular imaging operation whether GCC or Clang was faster on this Core i9 13900K Fedora Workstation setup.

SVT-AV1 benchmark with settings of Encoder Mode: Preset 4, Input: Bosphorus 4K. Clang 16: -O3 -march=native -flto was the fastest.
SVT-AV1 benchmark with settings of Encoder Mode: Preset 8, Input: Bosphorus 4K. GCC 13.1: -O3 -march=native -flto was the fastest.
SVT-AV1 benchmark with settings of Encoder Mode: Preset 12, Input: Bosphorus 4K. Clang 16: -O3 -march=native -flto was the fastest.
SVT-AV1 benchmark with settings of Encoder Mode: Preset 13, Input: Bosphorus 4K. Clang 16: -O3 -march=native -flto was the fastest.
SVT-HEVC benchmark with settings of Tuning: 1, Input: Bosphorus 4K. Clang 16: -O3 -march=native -flto was the fastest.
SVT-HEVC benchmark with settings of Tuning: 7, Input: Bosphorus 4K. Clang 16: -O3 -march=native -flto was the fastest.
SVT-HEVC benchmark with settings of Tuning: 10, Input: Bosphorus 4K. Clang 16: -O3 -march=native -flto was the fastest.
SVT-VP9 benchmark with settings of Tuning: PSNR/SSIM Optimized, Input: Bosphorus 4K. GCC 13.1: -O3 -march=native -flto was the fastest.
SVT-VP9 benchmark with settings of Tuning: Visual Quality Optimized, Input: Bosphorus 4K. Clang 16: -O3 -march=native -flto was the fastest.

The SVT video encoder performance results tended to be quite close between tested compilers, after all many video encoders rely on hand-tuned Assembly code.

uvg266 benchmark with settings of Video Input: Bosphorus 4K, Video Preset: Slow. Clang 16: -O3 -march=native -flto was the fastest.
uvg266 benchmark with settings of Video Input: Bosphorus 4K, Video Preset: Medium. Clang 16: -O3 -march=native -flto was the fastest.
uvg266 benchmark with settings of Video Input: Bosphorus 4K, Video Preset: Very Fast. Clang 16: -O3 -march=native -flto was the fastest.
uvg266 benchmark with settings of Video Input: Bosphorus 4K, Video Preset: Ultra Fast. Clang 16: -O3 -march=native -flto was the fastest.

The uvg266 open-source video encoder for H.266 was seeing better performance on Clang 16.

VVenC benchmark with settings of Video Input: Bosphorus 4K, Video Preset: Faster. Clang 16: -O3 -march=native -flto was the fastest.

Clang 16 celebrated another win with VVenC, another H.266/VVC encoder.

x265 benchmark with settings of Video Input: Bosphorus 4K. Clang 16: -O3 -march=native -flto was the fastest.

Related Articles