Squeezing More Performance Out Of The Linux Kernel With Clang + LTO
Written by Michael Larabel in Software on 21 July 2021. Page 3 of 4. 40 Comments

A wide variety of tests were run, 132 in total, but for most of them there wasn't a measurable difference whether the kernel under test was built with GCC or Clang. Overall though the Clang-built kernels led in more than 100 of the 132 tests, but often by razor-thin margins. The mainline kernel doesn't support GCC LTO for the Linux kernel at this time.

If taking the geometric mean of all 132 results, the Clang built kernel and Clang+LTO did lead over GCC, but with a miniscule lead.

Or if dropping all the results except for those with a statistically significant and measurable difference between the tested configurations, there are 28 tests with Clang + LTO build showing a much clearer victory. When looking at just those affected workloads, Clang+LTO squeezed out about an extra 5% better performance overall compared to using GCC.

Related Articles
Trending Linux News