GCC 6.1 Compiler Optimization Benchmarks

GCC 6.1.0 compiler benchmarks with different optimization flags. Intel Xeon E5-2687W v3 GCC compiler benchmarks on Debian. Tests by Michael Larabel of Phoronix for a future article.

HTML result view exported from: https://openbenchmarking.org/result/1605083-HA-GCCOPTIMI43&grs&sor.

GCC 6.1 Compiler Optimization BenchmarksProcessorMotherboardChipsetMemoryDiskGraphicsAudioMonitorNetworkOSKernelDisplay ServerDisplay DriverOpenGLCompilerFile-SystemScreen Resolution-O0-Os-Og-O1-O2-O3-O3 -march=native-O3 -march=native -flto-Ofast -march=nativeIntel Xeon E5-2687W v3 @ 3.50GHz (20 Cores)MSI X99S SLI PLUS (MS-7885) v1.0Intel Xeon E7 v3/Xeon16384MBPNY CS1211 120GB + 80GB INTEL SSDSCKGW08AMD FirePro V7900 2048MBRealtek ALC892ASUS PB278Intel ConnectionDebian testing4.5.0-1-amd64 (x86_64)X Server 1.18.3modesetting 1.18.33.3 Mesa 11.1.3 Gallium 0.4GCC 6.1.0ext42560x1440OpenBenchmarking.orgCompiler Details- --disable-multilib --enable-checking=releaseProcessor Details- Scaling Governor: intel_pstate powersave

GCC 6.1 Compiler Optimization Benchmarksencode-flac: WAV To FLAChimeno: Poisson Pressure Solvergraphics-magick: Local Adaptive Thresholdingencode-mp3: WAV To MP3hint: FLOATgraphics-magick: Sharpenbuild-php: Time To Compilebuild-imagemagick: Time To Compilegraphics-magick: Resizinggraphics-magick: HWB Color Spacegraphics-magick: Blurredis: LPUSHredis: SADDredis: SETredis: GETredis: LPOPpgbench: Buffer Test - Single Thread - Read Writescimark2: Monte Carlopgbench: Buffer Test - Heavy Contention - Read Writescimark2: Sparse Matrix Multiplyscimark2: Fast Fourier Transformpgbench: Buffer Test - Normal Load - Read Writescimark2: Dense LU Matrix Factorizationscimark2: Compositescimark2: Jacobi Successive Over-Relaxationhmmer: Pfam Database Search-O0-Os-Og-O1-O2-O3-O3 -march=native-O3 -march=native -flto-Ofast -march=native46.74424.571736.02103731655.85715.589.349711082476295.97491891.31479934.92548655.63547091.88303.93545.514840.762565.94440.574468.972454.121407.021028.9513.8210.621181.186816.28303914359.3312411.6132.43168188110598808.52607478.25596757.10645755.96642758.08346.32552.044497.152589.56456.354275.852482.131426.791053.8810.688.111102.645417.15326497871.931008.1813.35149168113602047.96582272.77592312.44652904.39637156.51353.15546.264538.182580.32456.614364.382521.751427.701033.568.237.681060.937615.14242450705.971359.7627.24168187137589230.57605722.93597265.48655681.23655900.13351.47551.444494.382609.45447.314257.862534.081437.731046.3610.196.681916.568214.26317711776.8313416.0838.55174186131599526.56598759.46586099.29628643.96649030.83363.87537.904494.082571.06461.554322.672534.231426.801029.2711.636.831895.458312.52312279718.2713617.5955.45171185130593409.02605861.48587251.75669846.73646935.48351.89547.854720.082622.50458.564495.932531.291442.301051.2713.087.012113.048512.45310268777.8714318.1055.40180190138584299.37615258.45584905.04631189.52655097.69349.97547.584539.622440.96443.714281.302468.301388.101039.9413.042150.96312975471.9382.86121.45614.592511.39465.502586.621445.101047.437.032019.618611.34309403432.8914517.9955.89182204144598935.85616016.48588019.67631191.87656696.79553.282517.37468.612519.721421.801050.058.32OpenBenchmarking.org

FLAC Audio Encoding

WAV To FLAC

OpenBenchmarking.orgSeconds, Fewer Is BetterFLAC Audio Encoding 1.3.1WAV To FLAC-O2-O3-O3 -march=native-Ofast -march=native-O1-Og-Os-O01122334455SE +/- 0.07, N = 5SE +/- 0.04, N = 5SE +/- 0.10, N = 5SE +/- 0.04, N = 5SE +/- 0.04, N = 5SE +/- 0.07, N = 5SE +/- 0.05, N = 5SE +/- 0.12, N = 56.686.837.017.037.688.1110.6246.74-O2-O3-O3 -march=native-Ofast -march=native-O1-Og-Os-O01. (CXX) g++ options: -fvisibility=hidden -lm

Himeno Benchmark

Poisson Pressure Solver

OpenBenchmarking.orgMFLOPS, More Is BetterHimeno Benchmark 3.0Poisson Pressure Solver-O3 -march=native -flto-O3 -march=native-Ofast -march=native-O2-O3-Os-Og-O1-O05001000150020002500SE +/- 7.85, N = 3SE +/- 9.13, N = 3SE +/- 3.96, N = 3SE +/- 4.78, N = 3SE +/- 6.74, N = 3SE +/- 3.40, N = 3SE +/- 1.19, N = 3SE +/- 1.09, N = 3SE +/- 0.64, N = 32150.962113.042019.611916.561895.451181.181102.641060.93424.57-march=native -flto-march=native-Ofast -march=native-O2-Os-Og-O1-O01. (CC) gcc options: -O3 -mavx2

GraphicsMagick

Operation: Local Adaptive Thresholding

OpenBenchmarking.orgIterations Per Minute, More Is BetterGraphicsMagick 1.3.19Operation: Local Adaptive Thresholding-Ofast -march=native-O3 -march=native-O3-O2-O1-Os-Og-O020406080100SE +/- 0.33, N = 3SE +/- 0.58, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.33, N = 3SE +/- 0.00, N = 38685838276685417-Ofast -march=native-O3 -march=native-O3-O2-O1-Os-Og-O01. (CC) gcc options: -fopenmp -pthread -lXext -lSM -lICE -lX11 -lz -lm -ldl -lpthread

LAME MP3 Encoding

WAV To MP3

OpenBenchmarking.orgSeconds, Fewer Is BetterLAME MP3 Encoding 3.99.3WAV To MP3-Ofast -march=native-O3 -march=native-O3-O2-O1-Os-Og-O0816243240SE +/- 0.07, N = 5SE +/- 0.10, N = 5SE +/- 0.09, N = 5SE +/- 0.10, N = 5SE +/- 0.08, N = 5SE +/- 0.06, N = 5SE +/- 0.06, N = 5SE +/- 0.09, N = 511.3412.4512.5214.2615.1416.2817.1536.02-Ofast -march=native-O3 -march=native-O3-O2-O1-Os-Og-O01. (CC) gcc options: -pipe -lm

Hierarchical INTegration

Test: FLOAT

OpenBenchmarking.orgQUIPs, More Is BetterHierarchical INTegration 1.0Test: FLOAT-Og-O2-O3 -march=native -flto-O3-O3 -march=native-Ofast -march=native-Os-O1-O070M140M210M280M350MSE +/- 179064.26, N = 3SE +/- 1047951.03, N = 3SE +/- 100984.48, N = 3SE +/- 978215.41, N = 3SE +/- 619811.97, N = 3SE +/- 547786.00, N = 3SE +/- 119724.21, N = 3SE +/- 222306.33, N = 3SE +/- 246206.62, N = 3326497871.93317711776.83312975471.93312279718.27310268777.87309403432.89303914359.33242450705.97103731655.85-Og-O2-O3 -march=native -flto-O3-O3 -march=native-Ofast -march=native-Os-O1-O01. (CC) gcc options: -lm

GraphicsMagick

Operation: Sharpen

OpenBenchmarking.orgIterations Per Minute, More Is BetterGraphicsMagick 1.3.19Operation: Sharpen-Ofast -march=native-O3 -march=native-O3-O1-O2-Os-Og-O0306090120150SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.00, N = 3SE +/- 0.33, N = 3SE +/- 0.00, N = 3SE +/- 0.33, N = 314514313613513412410071-Ofast -march=native-O3 -march=native-O3-O1-O2-Os-Og-O01. (CC) gcc options: -fopenmp -pthread -lXext -lSM -lICE -lX11 -lz -lm -ldl -lpthread

Timed PHP Compilation

Time To Compile

OpenBenchmarking.orgSeconds, Fewer Is BetterTimed PHP Compilation 5.2.9Time To Compile-O0-Og-O1-Os-O2-O3-Ofast -march=native-O3 -march=native-O3 -march=native -flto20406080100SE +/- 0.02, N = 3SE +/- 0.01, N = 3SE +/- 0.02, N = 3SE +/- 0.06, N = 3SE +/- 0.04, N = 3SE +/- 0.01, N = 3SE +/- 0.04, N = 3SE +/- 0.19, N = 3SE +/- 0.10, N = 35.588.189.7611.6116.0817.5917.9918.1082.86-O1-Os-O2-O3-Ofast -march=native-O3 -march=native-O3 -march=native -flto1. (CC) gcc options: -pedantic -ldl -lz -lm

Timed ImageMagick Compilation

Time To Compile

OpenBenchmarking.orgSeconds, Fewer Is BetterTimed ImageMagick Compilation 6.9.0Time To Compile-O0-Og-O1-Os-O2-O3 -march=native-O3-Ofast -march=native-O3 -march=native -flto306090120150SE +/- 0.10, N = 3SE +/- 0.13, N = 3SE +/- 0.21, N = 3SE +/- 0.08, N = 3SE +/- 0.06, N = 3SE +/- 0.23, N = 3SE +/- 0.14, N = 3SE +/- 0.09, N = 3SE +/- 0.25, N = 39.3413.3527.2432.4338.5555.4055.4555.89121.45

GraphicsMagick

Operation: Resizing

OpenBenchmarking.orgIterations Per Minute, More Is BetterGraphicsMagick 1.3.19Operation: Resizing-Ofast -march=native-O3 -march=native-O2-O3-O1-Os-Og-O04080120160200SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.67, N = 3SE +/- 0.00, N = 3SE +/- 1.00, N = 3SE +/- 0.58, N = 3SE +/- 0.33, N = 3SE +/- 0.00, N = 318218017417116816814997-Ofast -march=native-O3 -march=native-O2-O3-O1-Os-Og-O01. (CC) gcc options: -fopenmp -pthread -lXext -lSM -lICE -lX11 -lz -lm -ldl -lpthread

GraphicsMagick

Operation: HWB Color Space

OpenBenchmarking.orgIterations Per Minute, More Is BetterGraphicsMagick 1.3.19Operation: HWB Color Space-Ofast -march=native-O3 -march=native-Os-O1-O2-O3-Og-O04080120160200SE +/- 0.33, N = 3SE +/- 0.58, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.58, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3204190188187186185168110-Ofast -march=native-O3 -march=native-Os-O1-O2-O3-Og-O01. (CC) gcc options: -fopenmp -pthread -lXext -lSM -lICE -lX11 -lz -lm -ldl -lpthread

GraphicsMagick

Operation: Blur

OpenBenchmarking.orgIterations Per Minute, More Is BetterGraphicsMagick 1.3.19Operation: Blur-Ofast -march=native-O3 -march=native-O1-O2-O3-Og-Os-O0306090120150SE +/- 0.33, N = 3SE +/- 1.20, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.58, N = 3SE +/- 1.53, N = 3SE +/- 0.58, N = 3SE +/- 0.00, N = 314413813713113011311082-Ofast -march=native-O3 -march=native-O1-O2-O3-Og-Os-O01. (CC) gcc options: -fopenmp -pthread -lXext -lSM -lICE -lX11 -lz -lm -ldl -lpthread

Redis

Test: LPUSH

OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 3.0.1Test: LPUSH-Og-O2-Ofast -march=native-Os-O3-O1-O3 -march=native-O0130K260K390K520K650KSE +/- 553.25, N = 3SE +/- 1359.59, N = 3SE +/- 2036.63, N = 3SE +/- 1356.34, N = 3SE +/- 4012.35, N = 3SE +/- 8590.61, N = 6SE +/- 11218.12, N = 6SE +/- 2663.98, N = 3602047.96599526.56598935.85598808.52593409.02589230.57584299.37476295.971. (CC) gcc options: -ggdb -rdynamic -lm -pthread -ldl

Redis

Test: SADD

OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 3.0.1Test: SADD-Ofast -march=native-O3 -march=native-Os-O3-O1-O2-Og-O0130K260K390K520K650KSE +/- 126.46, N = 3SE +/- 126.17, N = 3SE +/- 4522.27, N = 3SE +/- 3715.65, N = 3SE +/- 2982.88, N = 3SE +/- 9681.71, N = 3SE +/- 11078.60, N = 6SE +/- 1350.43, N = 3616016.48615258.45607478.25605861.48605722.93598759.46582272.77491891.311. (CC) gcc options: -ggdb -rdynamic -lm -pthread -ldl

Redis

Test: SET

OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 3.0.1Test: SET-O1-Os-Og-Ofast -march=native-O3-O2-O3 -march=native-O0130K260K390K520K650KSE +/- 1956.89, N = 3SE +/- 5397.69, N = 3SE +/- 1909.49, N = 3SE +/- 2097.48, N = 3SE +/- 8111.26, N = 5SE +/- 6845.46, N = 3SE +/- 8041.99, N = 3SE +/- 7680.16, N = 3597265.48596757.10592312.44588019.67587251.75586099.29584905.04479934.921. (CC) gcc options: -ggdb -rdynamic -lm -pthread -ldl

Redis

Test: GET

OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 3.0.1Test: GET-O3-O1-Og-Os-Ofast -march=native-O3 -march=native-O2-O0140K280K420K560K700KSE +/- 4253.76, N = 3SE +/- 5335.15, N = 3SE +/- 2604.35, N = 3SE +/- 3565.12, N = 3SE +/- 6785.13, N = 3SE +/- 10870.06, N = 4SE +/- 5831.74, N = 3SE +/- 1566.53, N = 3669846.73655681.23652904.39645755.96631191.87631189.52628643.96548655.631. (CC) gcc options: -ggdb -rdynamic -lm -pthread -ldl

Redis

Test: LPOP

OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 3.0.1Test: LPOP-Ofast -march=native-O1-O3 -march=native-O2-O3-Os-Og-O0140K280K420K560K700KSE +/- 5651.00, N = 3SE +/- 2503.49, N = 3SE +/- 10960.53, N = 3SE +/- 5733.33, N = 3SE +/- 11650.40, N = 6SE +/- 12533.78, N = 3SE +/- 8860.98, N = 6SE +/- 3542.72, N = 3656696.79655900.13655097.69649030.83646935.48642758.08637156.51547091.881. (CC) gcc options: -ggdb -rdynamic -lm -pthread -ldl

PostgreSQL pgbench

Scaling: Buffer Test - Test: Single Thread - Mode: Read Write

OpenBenchmarking.orgTPS, More Is BetterPostgreSQL pgbench 9.4.3Scaling: Buffer Test - Test: Single Thread - Mode: Read Write-O2-Og-O3-O1-O3 -march=native-Os-O080160240320400SE +/- 2.06, N = 3SE +/- 5.68, N = 6SE +/- 2.78, N = 3SE +/- 5.58, N = 3SE +/- 1.70, N = 3SE +/- 4.13, N = 3SE +/- 4.48, N = 6363.87353.15351.89351.47349.97346.32303.93-O2-Og-O3-O1-O3 -march=native-Os-O01. (CC) gcc options: -fno-strict-aliasing -fwrapv -pthread -lpgcommon -lpgport -lpq -lpthread -lrt -lcrypt -ldl -lm

SciMark

Computational Test: Monte Carlo

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Monte Carlo-O3 -march=native -flto-Ofast -march=native-Os-O1-O3-O3 -march=native-Og-O0-O2130260390520650SE +/- 6.00, N = 4SE +/- 1.67, N = 4SE +/- 1.68, N = 4SE +/- 1.22, N = 4SE +/- 3.64, N = 4SE +/- 5.84, N = 4SE +/- 5.79, N = 4SE +/- 6.16, N = 4SE +/- 9.59, N = 4614.59553.28552.04551.44547.85547.58546.26545.51537.90-O3 -march=native -flto-Ofast -march=native-Os-O1-O3-O3 -march=native-Og-O0-O21. (CXX) g++ options:

PostgreSQL pgbench

Scaling: Buffer Test - Test: Heavy Contention - Mode: Read Write

OpenBenchmarking.orgTPS, More Is BetterPostgreSQL pgbench 9.4.3Scaling: Buffer Test - Test: Heavy Contention - Mode: Read Write-O0-O3-O3 -march=native-Og-Os-O1-O210002000300040005000SE +/- 21.91, N = 3SE +/- 40.24, N = 3SE +/- 66.74, N = 3SE +/- 54.29, N = 3SE +/- 27.80, N = 3SE +/- 67.44, N = 4SE +/- 19.05, N = 34840.764720.084539.624538.184497.154494.384494.08-O0-O3-O3 -march=native-Og-Os-O1-O21. (CC) gcc options: -fno-strict-aliasing -fwrapv -pthread -lpgcommon -lpgport -lpq -lpthread -lrt -lcrypt -ldl -lm

SciMark

Computational Test: Sparse Matrix Multiply

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Sparse Matrix Multiply-O3-O1-Os-Og-O2-O0-Ofast -march=native-O3 -march=native -flto-O3 -march=native6001200180024003000SE +/- 9.06, N = 4SE +/- 3.88, N = 4SE +/- 21.77, N = 4SE +/- 13.12, N = 4SE +/- 32.30, N = 4SE +/- 9.07, N = 4SE +/- 19.13, N = 4SE +/- 24.76, N = 4SE +/- 12.32, N = 42622.502609.452589.562580.322571.062565.942517.372511.392440.96-O3-O1-Os-Og-O2-O0-Ofast -march=native-O3 -march=native -flto-O3 -march=native1. (CXX) g++ options:

SciMark

Computational Test: Fast Fourier Transform

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Fast Fourier Transform-Ofast -march=native-O3 -march=native -flto-O2-O3-Og-Os-O1-O3 -march=native-O0100200300400500SE +/- 0.63, N = 4SE +/- 3.19, N = 4SE +/- 2.20, N = 4SE +/- 2.05, N = 4SE +/- 3.34, N = 4SE +/- 1.29, N = 4SE +/- 3.48, N = 4SE +/- 1.70, N = 4SE +/- 5.60, N = 4468.61465.50461.55458.56456.61456.35447.31443.71440.57-Ofast -march=native-O3 -march=native -flto-O2-O3-Og-Os-O1-O3 -march=native-O01. (CXX) g++ options:

PostgreSQL pgbench

Scaling: Buffer Test - Test: Normal Load - Mode: Read Write

OpenBenchmarking.orgTPS, More Is BetterPostgreSQL pgbench 9.4.3Scaling: Buffer Test - Test: Normal Load - Mode: Read Write-O3-O0-Og-O2-O3 -march=native-Os-O110002000300040005000SE +/- 64.78, N = 6SE +/- 44.94, N = 3SE +/- 64.39, N = 5SE +/- 62.15, N = 5SE +/- 18.80, N = 3SE +/- 32.55, N = 3SE +/- 80.41, N = 64495.934468.974364.384322.674281.304275.854257.86-O3-O0-Og-O2-O3 -march=native-Os-O11. (CC) gcc options: -fno-strict-aliasing -fwrapv -pthread -lpgcommon -lpgport -lpq -lpthread -lrt -lcrypt -ldl -lm

SciMark

Computational Test: Dense LU Matrix Factorization

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Dense LU Matrix Factorization-O3 -march=native -flto-O2-O1-O3-Og-Ofast -march=native-Os-O3 -march=native-O06001200180024003000SE +/- 28.87, N = 4SE +/- 3.32, N = 4SE +/- 7.15, N = 4SE +/- 7.24, N = 4SE +/- 4.63, N = 4SE +/- 11.60, N = 4SE +/- 18.22, N = 4SE +/- 10.80, N = 4SE +/- 26.42, N = 42586.622534.232534.082531.292521.752519.722482.132468.302454.12-O3 -march=native -flto-O2-O1-O3-Og-Ofast -march=native-Os-O3 -march=native-O01. (CXX) g++ options:

SciMark

Computational Test: Composite

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Composite-O3 -march=native -flto-O3-O1-Og-O2-Os-Ofast -march=native-O0-O3 -march=native30060090012001500SE +/- 7.57, N = 4SE +/- 2.58, N = 4SE +/- 1.73, N = 4SE +/- 3.98, N = 4SE +/- 7.42, N = 4SE +/- 2.83, N = 4SE +/- 5.38, N = 4SE +/- 8.59, N = 4SE +/- 4.89, N = 41445.101442.301437.731427.701426.801426.791421.801407.021388.10-O3 -march=native -flto-O3-O1-Og-O2-Os-Ofast -march=native-O0-O3 -march=native1. (CXX) g++ options:

SciMark

Computational Test: Jacobi Successive Over-Relaxation

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Jacobi Successive Over-Relaxation-Os-O3-Ofast -march=native-O3 -march=native -flto-O1-O3 -march=native-Og-O2-O02004006008001000SE +/- 1.16, N = 4SE +/- 2.16, N = 4SE +/- 0.76, N = 4SE +/- 6.06, N = 4SE +/- 3.32, N = 4SE +/- 6.48, N = 4SE +/- 8.62, N = 4SE +/- 12.72, N = 4SE +/- 9.29, N = 41053.881051.271050.051047.431046.361039.941033.561029.271028.95-Os-O3-Ofast -march=native-O3 -march=native -flto-O1-O3 -march=native-Og-O2-O01. (CXX) g++ options:

Timed HMMer Search

Pfam Database Search

OpenBenchmarking.orgSeconds, Fewer Is BetterTimed HMMer Search 2.3.2Pfam Database Search-Og-Ofast -march=native-O1-Os-O2-O3 -march=native-O3-O048121620SE +/- 0.05, N = 3SE +/- 0.27, N = 6SE +/- 0.16, N = 6SE +/- 0.19, N = 3SE +/- 0.51, N = 6SE +/- 0.68, N = 6SE +/- 0.35, N = 6SE +/- 0.01, N = 38.238.3210.1910.6811.6313.0413.0813.82-Og-Ofast -march=native-O1-Os-O2-O3 -march=native-O3-O01. (CC) gcc options: -pthread -lhmmer -lsquid -lm


Phoronix Test Suite v10.8.5