GCC 4.9.0 Compiler Optimization Tuning

Testing various CFLAGS/CXXFLAGS of different GCC compiler optimizations including the -O optimization levels, Link Time Optimizations, and -march=native targeting. benchmarks by Michael Larabel for a future article on phoronix.com

HTML result view exported from: https://openbenchmarking.org/result/1404130-KH-GCC490COM36&rdt&grt.

GCC 4.9.0 Compiler Optimization TuningProcessorMotherboardChipsetMemoryDiskGraphicsAudioMonitorNetworkOSKernelDesktopDisplay ServerDisplay DriverOpenGLCompilerFile-SystemScreen Resolution-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -fltoIntel Core i7-4770K @ 3.50GHz (8 Cores)ECS Z87H3-A2X EXTREME v1.0Intel 4th Gen Core DRAM16384MB120GB Samsung SSD 840ECS NVIDIA GeForce GTX 460 768MB (675/1804MHz)Realtek ALC1150Samsung SyncMasterRealtek RTL8111/8168/8411Ubuntu 14.043.13.0-22-generic (x86_64)Unity 7.2.0X Server 1.15.0NVIDIA 337.124.3.0GCC 4.9.0 20140411ext42560x1600OpenBenchmarking.orgCompiler Details- --enable-checking=releaseProcessor Details- Scaling Governor: acpi-cpufreq ondemand

GCC 4.9.0 Compiler Optimization Tuningc-ray: Total Timeencode-flac: WAV To FLACgraphics-magick: Blurgraphics-magick: Sharpengraphics-magick: Resizinggraphics-magick: HWB Color Spacegraphics-magick: Local Adaptive Thresholdinghint: FLOAThimeno: Poisson Pressure Solverencode-mp3: WAV To MP3build-apache: Time To Compilebuild-imagemagick: Time To Compilebuild-php: Time To Compile-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto63.9319.85995410012720113640165.43479.7133.1213.6316.7010.2144.235.5616412519221596272724038.561158.4115.0119.4232.3117.1622.824.6316412719121297353630824.751958.1011.8327.3259.0726.2240.425.3716112819221397357045741.731919.6612.5424.6647.3822.9622.654.5216312619222497372135723.161960.5611.4927.3926.3065.765.9614110918721578338799356.971250.4914.2023.0840.8220.2443.356.141528317420963276760433.281240.9715.5517.7026.0814.9517.093.61165140198213102373780357.461827.5510.8727.8360.9027.0117.093.62165140198213102372669017.171825.3910.8745.49130.2995.96OpenBenchmarking.org

C-Ray

Total Time

OpenBenchmarking.orgSeconds, Fewer Is BetterC-Ray 1.1Total Time-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto1530456075SE +/- 0.03, N = 3SE +/- 0.02, N = 3SE +/- 0.02, N = 3SE +/- 0.01, N = 3SE +/- 0.01, N = 3SE +/- 0.01, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 363.9344.2322.8240.4222.6565.7643.3517.0917.09-O0-O1-O2-Ofast-Os-Og-march=native-march=native -flto1. (CC) gcc options: -lm -lpthread -O3

FLAC Audio Encoding

WAV To FLAC

OpenBenchmarking.orgSeconds, Fewer Is BetterFLAC Audio Encoding 1.3.0WAV To FLAC-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto510152025SE +/- 0.01, N = 5SE +/- 0.03, N = 5SE +/- 0.00, N = 5SE +/- 0.00, N = 5SE +/- 0.00, N = 5SE +/- 0.01, N = 5SE +/- 0.00, N = 5SE +/- 0.00, N = 5SE +/- 0.00, N = 519.855.564.635.374.525.966.143.613.62-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto1. (CXX) g++ options: -fvisibility=hidden -logg -lm

GraphicsMagick

Operation: Blur

OpenBenchmarking.orgIterations Per Minute, More Is BetterGraphicsMagick 1.3.19Operation: Blur-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto4080120160200SE +/- 0.00, N = 3SE +/- 0.00, 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 = 3SE +/- 0.67, N = 399164164161163141152165165-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread

GraphicsMagick

Operation: Sharpen

OpenBenchmarking.orgIterations Per Minute, More Is BetterGraphicsMagick 1.3.19Operation: Sharpen-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto306090120150SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.33, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 35412512712812610983140140-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread

GraphicsMagick

Operation: Resizing

OpenBenchmarking.orgIterations Per Minute, More Is BetterGraphicsMagick 1.3.19Operation: Resizing-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto4080120160200SE +/- 0.00, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.33, N = 3SE +/- 0.58, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3100192191192192187174198198-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread

GraphicsMagick

Operation: HWB Color Space

OpenBenchmarking.orgIterations Per Minute, More Is BetterGraphicsMagick 1.3.19Operation: HWB Color Space-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto50100150200250SE +/- 0.00, N = 3SE +/- 0.33, N = 3SE +/- 0.58, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.00, N = 3SE +/- 0.33, N = 3SE +/- 0.33, N = 3SE +/- 0.00, N = 3127215212213224215209213213-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread

GraphicsMagick

Operation: Local Adaptive Thresholding

OpenBenchmarking.orgIterations Per Minute, More Is BetterGraphicsMagick 1.3.19Operation: Local Adaptive Thresholding-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto20406080100SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.33, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.00, N = 320969797977863102102-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread

Hierarchical INTegration

Test: FLOAT

OpenBenchmarking.orgQUIPs, More Is BetterHierarchical INTegration 1.0Test: FLOAT-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto80M160M240M320M400MSE +/- 47999.17, N = 3SE +/- 232620.63, N = 3SE +/- 189770.59, N = 3SE +/- 438886.50, N = 3SE +/- 825976.11, N = 3SE +/- 162740.51, N = 3SE +/- 175429.79, N = 3SE +/- 224417.18, N = 3SE +/- 330651.20, N = 3113640165.43272724038.56353630824.75357045741.73372135723.16338799356.97276760433.28373780357.46372669017.17-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto1. (CC) gcc options: -lm

Himeno Benchmark

Poisson Pressure Solver

OpenBenchmarking.orgMFLOPS, More Is BetterHimeno Benchmark 3.0Poisson Pressure Solver-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto400800120016002000SE +/- 0.41, N = 3SE +/- 4.67, N = 3SE +/- 2.65, N = 3SE +/- 3.26, N = 3SE +/- 0.48, N = 3SE +/- 1.98, N = 3SE +/- 2.41, N = 3SE +/- 1.54, N = 3SE +/- 1.57, N = 3479.711158.411958.101919.661960.561250.491240.971827.551825.39-O0-O1-O2-Ofast-Os-Og-march=native-march=native -flto1. (CC) gcc options: -O3

LAME MP3 Encoding

WAV To MP3

OpenBenchmarking.orgSeconds, Fewer Is BetterLAME MP3 Encoding 3.99.3WAV To MP3-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto816243240SE +/- 0.01, N = 5SE +/- 0.01, N = 5SE +/- 0.01, N = 5SE +/- 0.02, N = 5SE +/- 0.03, N = 5SE +/- 0.01, N = 5SE +/- 0.01, N = 5SE +/- 0.01, N = 5SE +/- 0.01, N = 533.1215.0111.8312.5411.4914.2015.5510.8710.87-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto1. (CC) gcc options: -pipe -lm

Timed Apache Compilation

Time To Compile

OpenBenchmarking.orgSeconds, Fewer Is BetterTimed Apache Compilation 2.4.7Time To Compile-O0-O1-O3-O2-Ofast-Os-Og-O3 -march=native-O3 -march=native -flto1020304050SE +/- 0.03, N = 3SE +/- 0.04, N = 3SE +/- 0.07, N = 3SE +/- 0.14, N = 3SE +/- 0.11, N = 3SE +/- 0.09, N = 3SE +/- 0.02, N = 3SE +/- 0.03, N = 3SE +/- 0.11, N = 313.6319.4227.3224.6627.3923.0817.7027.8345.49

Timed ImageMagick Compilation

Time To Compile

OpenBenchmarking.orgSeconds, Fewer Is BetterTimed ImageMagick Compilation 6.8.1-10Time To Compile-O0-O1-O3-O2-Os-Og-O3 -march=native-O3 -march=native -flto306090120150SE +/- 0.10, N = 3SE +/- 0.19, N = 3SE +/- 0.14, N = 3SE +/- 0.15, N = 3SE +/- 0.05, N = 3SE +/- 0.11, N = 3SE +/- 0.65, N = 3SE +/- 0.30, N = 316.7032.3159.0747.3840.8226.0860.90130.29

Timed PHP Compilation

Time To Compile

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


Phoronix Test Suite v10.8.4