GCC vs. Clang Benchmark Comparison At Varying Optimization Levels
Last week I posted various LLVM Clang and GCC compiler benchmarks using packages available on Ubuntu 16.04 LTS and with the testing from a Xeon Skylake system. Today are some complementary tests when benchmarking GCC 5.3.1 and LLVM Clang 3.8 while testing each compiler with a variety of different optimization levels.
Rather than testing GCC vs. Clang compilers with just one set of CFLAGS/CXXFLAGS, for this comparison I tested each of these open-source compilers with a variety of different optimization levels. GCC 5.3.1 and LLVM Clang 3.8 were each tested at -O0, -O1, -O2, -O2 -march=native, -O3, -O3 -march=native, and -Ofast -march=native.