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&grr .
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 hint: FLOAT encode-mp3: WAV To MP3 encode-flac: WAV To FLAC c-ray: Total Time build-php: Time To Compile build-imagemagick: Time To Compile build-apache: Time To Compile himeno: Poisson Pressure Solver graphics-magick: Local Adaptive Thresholding graphics-magick: HWB Color Space graphics-magick: Resizing graphics-magick: Sharpen graphics-magick: Blur -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 113640165.43 33.12 19.85 63.93 10.21 16.70 13.63 479.71 20 127 100 54 99 272724038.56 15.01 5.56 44.23 17.16 32.31 19.42 1158.41 96 215 192 125 164 357045741.73 12.54 5.37 40.42 22.96 47.38 24.66 1919.66 97 213 192 128 161 338799356.97 14.20 5.96 65.76 20.24 40.82 23.08 1250.49 78 215 187 109 141 276760433.28 15.55 6.14 43.35 14.95 26.08 17.70 1240.97 63 209 174 83 152 353630824.75 11.83 4.63 22.82 26.22 59.07 27.32 1958.10 97 212 191 127 164 372135723.16 11.49 4.52 22.65 26.30 27.39 1960.56 97 224 192 126 163 373780357.46 10.87 3.61 17.09 27.01 60.90 27.83 1827.55 102 213 198 140 165 372669017.17 10.87 3.62 17.09 95.96 130.29 45.49 1825.39 102 213 198 140 165 OpenBenchmarking.org
Hierarchical INTegration Test: FLOAT OpenBenchmarking.org QUIPs, More Is Better Hierarchical INTegration 1.0 Test: FLOAT -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 80M 160M 240M 320M 400M SE +/- 47999.17, N = 3 SE +/- 232620.63, N = 3 SE +/- 438886.50, N = 3 SE +/- 162740.51, N = 3 SE +/- 175429.79, N = 3 SE +/- 189770.59, N = 3 SE +/- 825976.11, N = 3 SE +/- 224417.18, N = 3 SE +/- 330651.20, N = 3 113640165.43 272724038.56 357045741.73 338799356.97 276760433.28 353630824.75 372135723.16 373780357.46 372669017.17 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 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 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 8 16 24 32 40 SE +/- 0.01, 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.03, N = 5 SE +/- 0.01, N = 5 SE +/- 0.01, N = 5 33.12 15.01 12.54 14.20 15.55 11.83 11.49 10.87 10.87 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 1. (CC) gcc options: -pipe -lm
FLAC Audio Encoding WAV To FLAC OpenBenchmarking.org Seconds, Fewer Is Better FLAC Audio Encoding 1.3.0 WAV To FLAC -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 5 10 15 20 25 SE +/- 0.01, N = 5 SE +/- 0.03, N = 5 SE +/- 0.00, N = 5 SE +/- 0.01, N = 5 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 19.85 5.56 5.37 5.96 6.14 4.63 4.52 3.61 3.62 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 1. (CXX) g++ options: -fvisibility=hidden -logg -lm
C-Ray Total Time OpenBenchmarking.org Seconds, Fewer Is Better C-Ray 1.1 Total Time -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 15 30 45 60 75 SE +/- 0.03, N = 3 SE +/- 0.02, N = 3 SE +/- 0.01, N = 3 SE +/- 0.01, N = 3 SE +/- 0.00, N = 3 SE +/- 0.02, N = 3 SE +/- 0.01, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 63.93 44.23 40.42 65.76 43.35 22.82 22.65 17.09 17.09 -O0 -O1 -O2 -Os -Og -Ofast -march=native -march=native -flto 1. (CC) gcc options: -lm -lpthread -O3
Timed PHP Compilation Time To Compile OpenBenchmarking.org Seconds, Fewer Is Better Timed PHP Compilation 5.2.9 Time To Compile -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 20 40 60 80 100 SE +/- 0.01, N = 3 SE +/- 0.10, N = 3 SE +/- 0.04, N = 3 SE +/- 0.35, N = 3 SE +/- 0.01, N = 3 SE +/- 0.01, N = 3 SE +/- 0.08, N = 3 SE +/- 0.04, N = 3 SE +/- 0.22, N = 3 10.21 17.16 22.96 20.24 14.95 26.22 26.30 27.01 95.96 -O1 -O2 -Os -Og -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 -O1 -O2 -Os -Og -O3 -O3 -march=native -O3 -march=native -flto 30 60 90 120 150 SE +/- 0.10, N = 3 SE +/- 0.19, N = 3 SE +/- 0.15, N = 3 SE +/- 0.05, N = 3 SE +/- 0.11, N = 3 SE +/- 0.14, N = 3 SE +/- 0.65, N = 3 SE +/- 0.30, N = 3 16.70 32.31 47.38 40.82 26.08 59.07 60.90 130.29
Timed Apache Compilation Time To Compile OpenBenchmarking.org Seconds, Fewer Is Better Timed Apache Compilation 2.4.7 Time To Compile -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 10 20 30 40 50 SE +/- 0.03, N = 3 SE +/- 0.04, N = 3 SE +/- 0.14, N = 3 SE +/- 0.09, N = 3 SE +/- 0.02, N = 3 SE +/- 0.07, N = 3 SE +/- 0.11, N = 3 SE +/- 0.03, N = 3 SE +/- 0.11, N = 3 13.63 19.42 24.66 23.08 17.70 27.32 27.39 27.83 45.49
Himeno Benchmark Poisson Pressure Solver OpenBenchmarking.org MFLOPS, More Is Better Himeno Benchmark 3.0 Poisson Pressure Solver -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 400 800 1200 1600 2000 SE +/- 0.41, N = 3 SE +/- 4.67, N = 3 SE +/- 3.26, N = 3 SE +/- 1.98, N = 3 SE +/- 2.41, N = 3 SE +/- 2.65, N = 3 SE +/- 0.48, N = 3 SE +/- 1.54, N = 3 SE +/- 1.57, N = 3 479.71 1158.41 1919.66 1250.49 1240.97 1958.10 1960.56 1827.55 1825.39 -O0 -O1 -O2 -Os -Og -Ofast -march=native -march=native -flto 1. (CC) gcc options: -O3
GraphicsMagick Operation: Local Adaptive Thresholding OpenBenchmarking.org Iterations Per Minute, More Is Better GraphicsMagick 1.3.19 Operation: Local Adaptive Thresholding -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 20 40 60 80 100 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 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 20 96 97 78 63 97 97 102 102 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 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 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 50 100 150 200 250 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.58, N = 3 SE +/- 0.33, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 127 215 213 215 209 212 224 213 213 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 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 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 40 80 120 160 200 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.58, N = 3 SE +/- 0.33, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 SE +/- 0.33, N = 3 100 192 192 187 174 191 192 198 198 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread
GraphicsMagick Operation: Sharpen OpenBenchmarking.org Iterations Per Minute, More Is Better GraphicsMagick 1.3.19 Operation: Sharpen -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 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 54 125 128 109 83 127 126 140 140 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 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 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 40 80 120 160 200 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 SE +/- 0.33, N = 3 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.67, N = 3 99 164 161 141 152 164 163 165 165 -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 1. (CC) gcc options: -std=gnu99 -fopenmp -pthread -ljbig -lwebp -ljpeg -lXext -lX11 -llzma -lxml2 -lz -lm -lpthread
Phoronix Test Suite v10.8.4