Some Meaningful Performance Benefits For Clang + LTO Built Linux Kernels
Before getting to the exciting results, just to set realistic expectations, for many workloads there was little to no benefit from switching the compiler building the Linux kernel:
Even for I/O workloads or those involving the AMDGPU kernel graphics driver, involving the LLVM Clang compiler or the Full LTO kernel build hadn't significantly affected the results compared to the straight-up kernel build with GCC 15. Both GCC and LLVM/Clang offer very competitive x86_64 performance these days.
Out of 163 benchmarks ran on these three kernel builds, in about two dozen benchmarks there ended up being a significant difference though to performance. So let's jump to where the kernel builds did provide some meaningful performance benefits from Clang and Clang + Full LTO.
