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 .
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 graphics-magick: Blur graphics-magick: Sharpen graphics-magick: Resizing graphics-magick: HWB Color Space graphics-magick: Local Adaptive Thresholding himeno: Poisson Pressure Solver build-apache: Time To Compile build-imagemagick: Time To Compile build-php: Time To Compile c-ray: Total Time encode-flac: WAV To FLAC encode-mp3: WAV To MP3 hint: FLOAT -O0 -O1 -O2 -Os -Og -O3 -Ofast -O3 -march=native -O3 -march=native -flto 99 54 100 127 20 479.71 13.63 16.70 10.21 63.93 19.85 33.12 113640165.43 164 125 192 215 96 1158.41 19.42 32.31 17.16 44.23 5.56 15.01 272724038.56 161 128 192 213 97 1919.66 24.66 47.38 22.96 40.42 5.37 12.54 357045741.73 141 109 187 215 78 1250.49 23.08 40.82 20.24 65.76 5.96 14.20 338799356.97 152 83 174 209 63 1240.97 17.70 26.08 14.95 43.35 6.14 15.55 276760433.28 164 127 191 212 97 1958.10 27.32 59.07 26.22 22.82 4.63 11.83 353630824.75 163 126 192 224 97 1960.56 27.39 26.30 22.65 4.52 11.49 372135723.16 165 140 198 213 102 1827.55 27.83 60.90 27.01 17.09 3.61 10.87 373780357.46 165 140 198 213 102 1825.39 45.49 130.29 95.96 17.09 3.62 10.87 372669017.17 OpenBenchmarking.org
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
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: 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
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
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
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
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
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
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
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
Phoronix Test Suite v10.8.4