Game World!

Join A World Of Gamers

Enter your email address:

Delivered by FeedBurner

Followers

Popular Posts

Monday 28 June 2021

Is Llvm faster than GCC?

 We Rely On Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained for the past 16 years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium. You can also consider a tip via PayPal.

GCC Is Currently Faster Than LLVM's Clang At Compiling The Linux Kernel
Written by Michael Larabel in GNU on 2 September 2020 at 12:00 AM EDT. 31 Comments
GNU --
While LLVM's Clang C/C++ compiler was traditionally known for its faster build speeds than GCC, in recent releases of GCC the build speeds have improved and in some areas LLVM/Clang has slowed down with further optimization passes and other work added to its growing code-base. As it stands right now, GCC is faster than Clang at compiling the Linux kernel.

Presented at last week's Linux Plumbers Conference 2020 was a look at the kernel compile times with Clang. What developers Nathan Chancellor and Nathan Huckleberry found were that "GCC always beats LLVM" for 64-bit ARM and x86_64, even when LLVM is compiled with LTO and PGO enabled. Only when LLVM was compiled with PGO to build 32-bit ARM was it faster at compiling the Linux kernel than GCC.

Historically that would be surprising but given the latest compilers and their fierce but friendly rivalry over compiler performance it's not too much of a shocker. This though has led the LLVM developers to explore future avenues for improvement. For example, redundant work inline Assembly statements consume around ~13% of the build process and issues there have already been resolved for Clang 11. There are also expensive calculations tracking macro arguments source locations.

With the upstream Clang compiler building the upstream kernel compiler for x86_64 and AArch64 (and most recently i686), the LLVM developers will be looking more closely at build times moving ahead.


More details within this slide deck. Separately for those interested in evaluating different CPUs for their kernel compile time capabilities, see our OpenBenchmarking.org result overview page.

Floating Button

Button