LLVM Clang Compiler Optimization Benchmarks From -O0 To -O3 -march=native

Written by Michael Larabel in LLVM on 5 February 2016 at 11:33 AM EST. 15 Comments
LLVM
As some recent GCC 5.2 compile tuning tests with various CFLAGS/CXXFLAGS were of interest to a number of Phoronix readers, hare are some benchmarks with a number of different compiler flag tests when using the LLVM Clang 3.8 compiler.

Using the LLVM Clang 3.8 code-branches for this soon-to-be-out compiler, I ran some compiler benchmarks on an Intel Haswell Xeon system when trying out the different common compiler optimization flags; similar to what's been done in past Phoronix articles, but always interesting to see the performance impact of the generated binaries by these different optimization levels.
LLVM Clang 3.8 Compiler Tuning

Tested for this article was -O0, -O1, -O2, -Oz, -O3, and -O3 -march=native. Ubuntu 16.04 daily x86_64 was running on this system.
LLVM Clang 3.8 Compiler Tuning

For some tests, -march=native makes the biggest impact...
LLVM Clang 3.8 Compiler Tuning

In others, the most basic optimizations are enough.
LLVM Clang 3.8 Compiler Tuning

Of course, the more optimization passes, the longer the compiler times.
LLVM Clang 3.8 Compiler Tuning

To see all of these LLVM Clang 3.8 compiler optimization level benchmarks, visit this OpenBenchmarking.org result file to analyze all of the results.
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