AMD/Intel Benchmarks: Building The Mainline Linux x86_64 Kernel With LLVM Clang

Written by Michael Larabel in Software on 12 September 2019 at 10:31 AM EDT. Page 4 of 4. 23 Comments.
GCC vs. LLVM Clang - Linux Kernel Build Performance
GCC vs. LLVM Clang - Linux Kernel Build Performance
GCC vs. LLVM Clang - Linux Kernel Build Performance
GCC vs. LLVM Clang - Linux Kernel Build Performance

With the Hackbench Linux kernel scheduler benchmark, using the Clang compiler to build Linux 5.3 only hurt the performance.

GCC vs. LLVM Clang - Linux Kernel Build Performance
GCC vs. LLVM Clang - Linux Kernel Build Performance

The PostgreSQL performance was about the same on the two kernel builds.

GCC vs. LLVM Clang - Linux Kernel Build Performance

The semaphores performance was coming in slightly higher on the Clang built kernel.

GCC vs. LLVM Clang - Linux Kernel Build Performance

The socket activity micro-benchmark meanwhile saw the best performance on both systems out of the GCC built kernel.

GCC vs. LLVM Clang - Linux Kernel Build Performance

The context switching time also ended up being slightly higher with the Clang built kernel.

GCC vs. LLVM Clang - Linux Kernel Build Performance

The Apache performance was edging slightly higher on the GCC built kernel.

GCC vs. LLVM Clang - Linux Kernel Build Performance

When running 97 different tests across the two systems and the kernel builds from GCC and Clang, the race was very close. In looking at the geometric mean, the end result was a wash for the Core i9 9900K while the Ryzen 9 3900X performance was ever so slightly higher using GCC over Clang. to build the Linux 5.3 mainline kernel. There's still some shortcomings as mentioned to building the Linux kernel with Clang, but it's great that it's now largely working with the mainline Clang compiler and mainline Linux x86_64 kernel.

If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal or Stripe tips are also graciously accepted. Thanks for your support.


Related Articles
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.