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
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.

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.

For some tests, -march=native makes the biggest impact...

In others, the most basic optimizations are enough.

Of course, the more optimization passes, the longer the compiler times.

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
Author picture

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 or contacted via MichaelLarabel.com.

Popular News This Week