GCC 9 Compiler Tuning Benchmarks At Various Optimization Levels, Vectorize Options
Written by Michael Larabel in Software on 12 January 2019. Page 1 of 3. 76 Comments

With the mention earlier this week of GCC potentially enabling the vectorize options at the -O2 optimization level, I carried out some fresh GCC 9 development benchmarks at various optimization levels for reference.

Mostly for reference purposes, on an Intel Core i9 system I used a GCC 9.0 snapshot and carried out various C/C++ benchmarks in the following different configurations:

-O0
-Og
-O1
-O2
-O2 -ftree-vectorize -ftree-slp-vectorize
-O3
-O3 -march=native

For the purposes of the discussion earlier this week, the default -O2 behavior would in turn be the equivalent of what is currently "-O2 -ftree-vectorize -ftree-slp-vectorize" for Intel/AMD x86_64 systems. But it doesn't look like that change will happen for GCC 9.1 but rather for next year's GCC 10 release.

All of these benchmarks were done on an Intel Core i9 7980XE system with ASUS PRIME X299-A motherboard, 16GB DDR4, Samsung 970 EVO 500GB NVMe SSD, and was running Clear Linux. Clear Linux 27030 was the release used with the Linux 4.19.13 kernel and using our own GCC 9.0.0 snapshot build in a release configuration.

Via the Phoronix Test Suite a variety of benchmarks were run while altering the CFLAGS/CXXFLAGS to reflect the desired optimization levels.



Related Articles
Trending Linux News