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