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&sor&grs .
GCC 4.9.0 Compiler Optimization Tuning Processor Motherboard Chipset Memory Disk Graphics Audio Monitor Network OS Kernel Desktop Display Server Display Driver OpenGL Compiler File-System Screen Resolution -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto Intel Core i7-4770K @ 3.50GHz (8 Cores) ECS Z87H3-A2X EXTREME v1.0 Intel 4th Gen Core DRAM 16384MB 120GB Samsung SSD 840 ECS NVIDIA GeForce GTX 460 768MB (675/1804MHz) Realtek ALC1150 Samsung SyncMaster Realtek RTL8111/8168/8411 Ubuntu 14.04 3.13.0-22-generic (x86_64) Unity 7.2.0 X Server 1.15.0 NVIDIA 337.12 4.3.0 GCC 4.9.0 20140411 ext4 2560x1600 OpenBenchmarking.org Compiler Details - --enable-checking=release Processor Details - Scaling Governor: acpi-cpufreq ondemand
GCC 4.9.0 Compiler Optimization Tuning build-php: Time To Compile build-imagemagick: Time To Compile encode-flac: WAV To FLAC graphics-magick: Local Adaptive Thresholding himeno: Poisson Pressure Solver c-ray: Total Time build-apache: Time To Compile hint: FLOAT encode-mp3: WAV To MP3 graphics-magick: Sharpen graphics-magick: Resizing graphics-magick: HWB Color Space graphics-magick: Blur -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 10.21 16.70 19.85 20 479.71 63.93 13.63 113640165.43 33.12 54 100 127 99 17.16 32.31 5.56 96 1158.41 44.23 19.42 272724038.56 15.01 125 192 215 164 22.96 47.38 5.37 97 1919.66 40.42 24.66 357045741.73 12.54 128 192 213 161 20.24 40.82 5.96 78 1250.49 65.76 23.08 338799356.97 14.20 109 187 215 141 14.95 26.08 6.14 63 1240.97 43.35 17.70 276760433.28 15.55 83 174 209 152 26.22 59.07 4.63 97 1958.10 22.82 27.32 353630824.75 11.83 127 191 212 164 26.30 4.52 97 1960.56 22.65 27.39 372135723.16 11.49 126 192 224 163 27.01 60.90 3.61 102 1827.55 17.09 27.83 373780357.46 10.87 140 198 213 165 95.96 130.29 3.62 102 1825.39 17.09 45.49 372669017.17 10.87 140 198 213 165 OpenBenchmarking.org
Timed PHP Compilation Time To Compile OpenBenchmarking.org Seconds, Fewer Is Better Timed PHP Compilation 5.2.9 Time To Compile -O0 -Og -O1 -Os -O2 -O3 -Ofast -O3 -march=native -O3 -march=native -flto 20 40 60 80 100 SE +/- 0.01, N = 3 SE +/- 0.01, N = 3 SE +/- 0.10, N = 3 SE +/- 0.35, N = 3 SE +/- 0.04, N = 3 SE +/- 0.01, N = 3 SE +/- 0.08, N = 3 SE +/- 0.04, N = 3 SE +/- 0.22, N = 3 10.21 14.95 17.16 20.24 22.96 26.22 26.30 27.01 95.96 -Og -O1 -Os -O2 -O3 -Ofast -O3 -march=native -O3 -march=native -flto 1. (CC) gcc options: -pedantic -ldl -lz -lm
Timed ImageMagick Compilation Time To Compile OpenBenchmarking.org Seconds, Fewer Is Better Timed ImageMagick Compilation 6.8.1-10 Time To Compile -O0 -Og -O1 -Os -O2 -O3 -O3 -march=native -O3 -march=native -flto 30 60 90 120 150 SE +/- 0.10, N = 3 SE +/- 0.11, N = 3 SE +/- 0.19, N = 3 SE +/- 0.05, N = 3 SE +/- 0.15, N = 3 SE +/- 0.14, N = 3 SE +/- 0.65, N = 3 SE +/- 0.30, N = 3 16.70 26.08 32.31 40.82 47.38 59.07 60.90 130.29
FLAC Audio Encoding WAV To FLAC OpenBenchmarking.org Seconds, Fewer Is Better FLAC Audio Encoding 1.3.0 WAV To FLAC -O3 -march=native -O3 -march=native -flto -Ofast -O3 -O2 -O1 -Os -Og -O0 5 10 15 20 25 SE +/- 0.00, N = 5 SE +/- 0.00, N = 5 SE +/- 0.00, N = 5 SE +/- 0.00, N = 5 SE +/- 0.00, N = 5 SE +/- 0.03, N = 5 SE +/- 0.01, N = 5 SE +/- 0.00, N = 5 SE +/- 0.01, N = 5 3.61 3.62 4.52 4.63 5.37 5.56 5.96 6.14 19.85 -O3 -march=native -O3 -march=native -flto -Ofast -O3 -O2 -O1 -Os -Og -O0 1. (CXX) g++ options: -fvisibility=hidden -logg -lm
GraphicsMagick Operation: Local Adaptive Thresholding OpenBenchmarking.org Iterations Per Minute, More Is Better GraphicsMagick 1.3.19 Operation: Local Adaptive Thresholding -O3 -march=native -flto -O3 -march=native -Ofast -O3 -O2 -O1 -Os -Og -O0 20 40 60 80 100 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 102 102 97 97 97 96 78 63 20 -O3 -march=native -flto -O3 -march=native -Ofast -O3 -O2 -O1 -Os -Og -O0 1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread
Himeno Benchmark Poisson Pressure Solver OpenBenchmarking.org MFLOPS, More Is Better Himeno Benchmark 3.0 Poisson Pressure Solver -Ofast -O3 -O2 -O3 -march=native -O3 -march=native -flto -Os -Og -O1 -O0 400 800 1200 1600 2000 SE +/- 0.48, N = 3 SE +/- 2.65, N = 3 SE +/- 3.26, N = 3 SE +/- 1.54, N = 3 SE +/- 1.57, N = 3 SE +/- 1.98, N = 3 SE +/- 2.41, N = 3 SE +/- 4.67, N = 3 SE +/- 0.41, N = 3 1960.56 1958.10 1919.66 1827.55 1825.39 1250.49 1240.97 1158.41 479.71 -Ofast -O2 -march=native -march=native -flto -Os -Og -O1 -O0 1. (CC) gcc options: -O3
C-Ray Total Time OpenBenchmarking.org Seconds, Fewer Is Better C-Ray 1.1 Total Time -O3 -march=native -O3 -march=native -flto -Ofast -O3 -O2 -Og -O1 -O0 -Os 15 30 45 60 75 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.01, N = 3 SE +/- 0.02, N = 3 SE +/- 0.01, N = 3 SE +/- 0.00, N = 3 SE +/- 0.02, N = 3 SE +/- 0.03, N = 3 SE +/- 0.01, N = 3 17.09 17.09 22.65 22.82 40.42 43.35 44.23 63.93 65.76 -march=native -march=native -flto -Ofast -O2 -Og -O1 -O0 -Os 1. (CC) gcc options: -lm -lpthread -O3
Timed Apache Compilation Time To Compile OpenBenchmarking.org Seconds, Fewer Is Better Timed Apache Compilation 2.4.7 Time To Compile -O0 -Og -O1 -Os -O2 -O3 -Ofast -O3 -march=native -O3 -march=native -flto 10 20 30 40 50 SE +/- 0.03, N = 3 SE +/- 0.02, N = 3 SE +/- 0.04, N = 3 SE +/- 0.09, N = 3 SE +/- 0.14, N = 3 SE +/- 0.07, N = 3 SE +/- 0.11, N = 3 SE +/- 0.03, N = 3 SE +/- 0.11, N = 3 13.63 17.70 19.42 23.08 24.66 27.32 27.39 27.83 45.49
Hierarchical INTegration Test: FLOAT OpenBenchmarking.org QUIPs, More Is Better Hierarchical INTegration 1.0 Test: FLOAT -O3 -march=native -O3 -march=native -flto -Ofast -O2 -O3 -Os -Og -O1 -O0 80M 160M 240M 320M 400M SE +/- 224417.18, N = 3 SE +/- 330651.20, N = 3 SE +/- 825976.11, N = 3 SE +/- 438886.50, N = 3 SE +/- 189770.59, N = 3 SE +/- 162740.51, N = 3 SE +/- 175429.79, N = 3 SE +/- 232620.63, N = 3 SE +/- 47999.17, N = 3 373780357.46 372669017.17 372135723.16 357045741.73 353630824.75 338799356.97 276760433.28 272724038.56 113640165.43 -O3 -march=native -O3 -march=native -flto -Ofast -O2 -O3 -Os -Og -O1 -O0 1. (CC) gcc options: -lm
LAME MP3 Encoding WAV To MP3 OpenBenchmarking.org Seconds, Fewer Is Better LAME MP3 Encoding 3.99.3 WAV To MP3 -O3 -march=native -O3 -march=native -flto -Ofast -O3 -O2 -Os -O1 -Og -O0 8 16 24 32 40 SE +/- 0.01, N = 5 SE +/- 0.01, N = 5 SE +/- 0.03, N = 5 SE +/- 0.01, N = 5 SE +/- 0.02, N = 5 SE +/- 0.01, N = 5 SE +/- 0.01, N = 5 SE +/- 0.01, N = 5 SE +/- 0.01, N = 5 10.87 10.87 11.49 11.83 12.54 14.20 15.01 15.55 33.12 -O3 -march=native -O3 -march=native -flto -Ofast -O3 -O2 -Os -O1 -Og -O0 1. (CC) gcc options: -pipe -lm
GraphicsMagick Operation: Sharpen OpenBenchmarking.org Iterations Per Minute, More Is Better GraphicsMagick 1.3.19 Operation: Sharpen -O3 -march=native -flto -O3 -march=native -O2 -O3 -Ofast -O1 -Os -Og -O0 30 60 90 120 150 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 140 140 128 127 126 125 109 83 54 -O3 -march=native -flto -O3 -march=native -O2 -O3 -Ofast -O1 -Os -Og -O0 1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread
GraphicsMagick Operation: Resizing OpenBenchmarking.org Iterations Per Minute, More Is Better GraphicsMagick 1.3.19 Operation: Resizing -O3 -march=native -flto -O3 -march=native -Ofast -O2 -O1 -O3 -Os -Og -O0 40 80 120 160 200 SE +/- 0.33, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.33, N = 3 SE +/- 0.33, N = 3 SE +/- 0.58, N = 3 SE +/- 0.00, N = 3 198 198 192 192 192 191 187 174 100 -O3 -march=native -flto -O3 -march=native -Ofast -O2 -O1 -O3 -Os -Og -O0 1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread
GraphicsMagick Operation: HWB Color Space OpenBenchmarking.org Iterations Per Minute, More Is Better GraphicsMagick 1.3.19 Operation: HWB Color Space -Ofast -Os -O1 -O3 -march=native -flto -O3 -march=native -O2 -O3 -Og -O0 50 100 150 200 250 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.33, N = 3 SE +/- 0.58, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 224 215 215 213 213 213 212 209 127 -Ofast -Os -O1 -O3 -march=native -flto -O3 -march=native -O2 -O3 -Og -O0 1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread
GraphicsMagick Operation: Blur OpenBenchmarking.org Iterations Per Minute, More Is Better GraphicsMagick 1.3.19 Operation: Blur -O3 -march=native -flto -O3 -march=native -O3 -O1 -Ofast -O2 -Og -Os -O0 40 80 120 160 200 SE +/- 0.67, N = 3 SE +/- 0.33, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 165 165 164 164 163 161 152 141 99 -O3 -march=native -flto -O3 -march=native -O3 -O1 -Ofast -O2 -Og -Os -O0 1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread
Phoronix Test Suite v10.8.4