Firefox Is Now Built With Clang+LTO Everywhere, Sizable Performance Wins For Linux

Written by Michael Larabel in Mozilla on 12 September 2018 at 05:33 AM EDT. 50 Comments
MOZILLA
Firefox nightly builds are now built with the LLVM Clang compiler on all major platforms and the Linux build in particular is also now utilizing PGO optimizations too. Faster Firefox is coming thanks to this compiler work.

All of Mozilla's tier-one platforms are now building the newest Firefox browser code under the Clang compiler and having LTO (Link Time Optimizations) enabled. That includes Linux, Mac, Android, Windows across ARM / AArch64 / x86 relying upon this open-source compiler. For now only the Linux builds also have PGO (Profile Guided Optimizations) enabled.

With the compiler re-tooling on Linux they are seeing about 5% better performance and upwards of 18% in select tests compared to their previous GCC (6.4-based) compiler with PGO. The current Clang stack they are using is based on LLVM6 while when they transition to the upcoming LLVM/Clang 7.0 they expect 2~5% better performance on top of that.

Mozilla developers did try GCC LTO as well as switching to the newest GCC8 release, but ran into problems. These new release binaries should go into effect for the Firefox 64 release.

As not a performance win but a security win, Firefox Linux builds are also finally being built as Position Intependent Executables (PIE).

More details on these exciting compiler advancements for Firefox via this blog post.
Related News
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.

Popular News This Week