Over the past few years building the Linux kernel with Clang has matured a lot thanks to upstream improvements to both LLVM/Clang and the Linux kernel. As it’s been a while since our last comparison for GCC vs. Clang built kernels on the resulting system performance, our latest year-end 2025 benchmarking is providing a fresh look at the Linux 6.19 upstream Git kernel built under the latest stable GCC 15 and LLVM Clang 21 compilers. Plus with the Clang-built kernel is also the option of the Link-Time Optimized (LTO) kernel for even greater performance.
Today’s benchmarking is looking at the performance of the same Linux 6.19 Git kernel revision built under a few different configurations:
– Using GCC 15.2 to build the kernel as is commonly done by a majority of the Linux distributions using the GNU Compiler Collection as the default compiler.
– Using LLVM Clang 21.1.7 to build the Linux 6.19 kernel in the same kernel configuration as the GCC built kernel.
– The same LLVM Clang 21.1.7 build configuration as above but opting for a Clang Full LTO kernel build rather than the Thin LTO option.
The three kernels were tested on the same workstation: an AMD Ryzen Threadripper PRO 9995WX on an ASUS Pro WS TRX50-SAGE WIFI motherboard with Radeon AI PRO R9700 graphics and 2TB Corsair MP700 PRO PCIe 5.0 NVMe SSD.
An Ubuntu 26.04 development snapshot was running on this AMD Ryzen Threadripper PRO workstation and the only change made between the testing runs was swapping the kernel builds as noted above.
