LLVM 3.4 vs. GCC 4.9 Compiler Benchmarks Tests by Michael Larabel for a future article on Phoronix.com looking at the LLVM Clang 3.4 open-source compiler performance from Ubuntu Linux then compared to GCC 4.8 and GCC 4.9.
HTML result view exported from: https://openbenchmarking.org/result/1312111-SO-GCC49LLVM96&grs .
LLVM 3.4 vs. GCC 4.9 Compiler Benchmarks Processor Motherboard Chipset Memory Disk Graphics Audio Monitor Network OS Kernel Desktop Display Server Display Driver OpenGL Compiler File-System Screen Resolution LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 Intel Core i7-4960X @ 4.00GHz (12 Cores) MSI X79MA-GD45 (MS-7738) v1.0 Intel Xeon E5 v2/Core 8192MB 1000GB Seagate ST1000DX001-1CM1 Sapphire AMD Radeon HD 4870 512MB Realtek ALC892 DELL S2409W Realtek RTL8111/8168/8411 Ubuntu 14.04 3.13.0-999-generic (x86_64) Unity 7.1.2 X Server 1.14.4 radeon 7.2.0 3.1 Mesa 10.0.0 Gallium 0.4 Clang 3.3 + LLVM 3.3 ext4 1920x1080 Clang 3.4 (SVN 197046) + LLVM 3.4 GCC 4.8.2 GCC 4.9.0 20131208 OpenBenchmarking.org Compiler Details - LLVM Clang 3.3: Optimized build; Built Dec 11 2013 (09:55:18); Default target: x86_64-unknown-linux-gnu; Host CPU: x86-64 - LLVM Clang 3.4 SVN: Optimized build; Built Dec 11 2013 (10:19:57); Default target: x86_64-unknown-linux-gnu; Host CPU: core-avx-i - GCC 4.8.2: --enable-checking=release --enable-languages=c,c++ - GCC 4.9.0 20131208: --enable-checking=release --enable-languages=c,c++ Processor Details - Scaling Governor: intel_pstate powersave
LLVM 3.4 vs. GCC 4.9 Compiler Benchmarks build-mplayer: Time To Compile scimark2: Dense LU Matrix Factorization blake2: Phoronix Test Suite v4.8.6 hint: FLOAT botan: KASUMI scimark2: Jacobi Successive Over-Relaxation scimark2: Composite encode-flac: WAV To FLAC botan: AES-256 himeno: Poisson Pressure Solver scimark2: Sparse Matrix Multiply compress-pbzip2: 256MB File Compression botan: CAST-256 hint: DOUBLE c-ray: Total Time scimark2: Monte Carlo encode-mp3: WAV To MP3 botan: X9.19-MAC compress-7zip: Compress Speed Test botan: Twofish scimark2: Fast Fourier Transform n-queens: Elapsed Time ffmpeg: H.264 HD To NTSC DV apache: Static Web Page Serving botan: Tiger hmmer: Pfam Database Search nginx: Static Web Page Serving build-php: Time To Compile LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 2489.31 7.58 277549891.07 67.70 1726.03 1531.29 5.65 192.16 1671.60 2469.34 5.70 114.20 599037509.43 19.54 632.55 12.86 83.84 30761 195.64 339.21 11.30 14690.90 433.55 8.71 18991.89 15.26 3.16 4449.09 5.10 230228636.05 52.21 1724.82 1986.97 4.84 202.80 1713.47 2779.39 5.71 110.71 588678410.65 19.94 637.24 11.79 79.86 30977 200.82 344.33 11.42 14606.91 431.77 8.70 18974.45 13.50 31.62 2501.01 5.30 337303850.89 76.59 1205.85 1389.41 5.29 150.44 1714.84 2315.77 4.81 96.56 679836110.18 17.49 577.28 12.75 86.57 29344 200.74 347.12 24.99 11.35 14621.88 431.68 8.73 18948.07 20.81 33.07 2506.89 5.32 340096979.25 1208.22 1390.53 4.11 2080.93 2317.41 689565776.59 17.42 572.28 12.55 29544 347.83 24.58 11.28 14553.30 8.70 14991.69 21.53 OpenBenchmarking.org
Timed MPlayer Compilation Time To Compile OpenBenchmarking.org Seconds, Fewer Is Better Timed MPlayer Compilation 1.0-rc3 Time To Compile LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 8 16 24 32 40 SE +/- 0.05, N = 4 SE +/- 0.19, N = 3 SE +/- 0.24, N = 3 3.16 31.62 33.07
SciMark Computational Test: Dense LU Matrix Factorization OpenBenchmarking.org Mflops, More Is Better SciMark 2.0 Computational Test: Dense LU Matrix Factorization LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 1000 2000 3000 4000 5000 SE +/- 2.90, N = 4 SE +/- 4.65, N = 4 SE +/- 5.62, N = 4 SE +/- 5.63, N = 4 2489.31 4449.09 2501.01 2506.89 1. (CXX) g++ options: -O3 -march=native
BLAKE2 Phoronix Test Suite v4.8.6 OpenBenchmarking.org Cycles Per Byte, Fewer Is Better BLAKE2 20121223 Phoronix Test Suite v4.8.6 LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 2 4 6 8 10 SE +/- 0.01, N = 3 SE +/- 0.08, N = 6 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 7.58 5.10 5.30 5.32 1. (CC) gcc options: -std=gnu99 -O3 -march=native -lcrypto -lz
Hierarchical INTegration Test: FLOAT OpenBenchmarking.org QUIPs, More Is Better Hierarchical INTegration 1.0 Test: FLOAT LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 70M 140M 210M 280M 350M SE +/- 426397.20, N = 3 SE +/- 87866.73, N = 3 SE +/- 429948.29, N = 3 SE +/- 253360.03, N = 3 277549891.07 230228636.05 337303850.89 340096979.25 1. (CC) gcc options: -O3 -march=native -lm
Botan Test: KASUMI OpenBenchmarking.org Mbytes/s, More Is Better Botan 1.10.3 Test: KASUMI LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 20 40 60 80 100 67.70 52.21 76.59 1. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2
SciMark Computational Test: Jacobi Successive Over-Relaxation OpenBenchmarking.org Mflops, More Is Better SciMark 2.0 Computational Test: Jacobi Successive Over-Relaxation LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 400 800 1200 1600 2000 SE +/- 1.21, N = 4 SE +/- 1.40, N = 4 SE +/- 1.18, N = 4 SE +/- 1.19, N = 4 1726.03 1724.82 1205.85 1208.22 1. (CXX) g++ options: -O3 -march=native
SciMark Computational Test: Composite OpenBenchmarking.org Mflops, More Is Better SciMark 2.0 Computational Test: Composite LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 400 800 1200 1600 2000 SE +/- 1.54, N = 4 SE +/- 1.51, N = 4 SE +/- 1.82, N = 4 SE +/- 1.83, N = 4 1531.29 1986.97 1389.41 1390.53 1. (CXX) g++ options: -O3 -march=native
FLAC Audio Encoding WAV To FLAC OpenBenchmarking.org Seconds, Fewer Is Better FLAC Audio Encoding 1.3.0 WAV To FLAC LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 1.2713 2.5426 3.8139 5.0852 6.3565 SE +/- 0.00, N = 5 SE +/- 0.00, N = 5 SE +/- 0.00, N = 5 SE +/- 0.00, N = 5 5.65 4.84 5.29 4.11 1. (CXX) g++ options: -O3 -march=native -fvisibility=hidden -logg -lm
Botan Test: AES-256 OpenBenchmarking.org Mbytes/s, More Is Better Botan 1.10.3 Test: AES-256 LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 40 80 120 160 200 192.16 202.80 150.44 1. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2
Himeno Benchmark Poisson Pressure Solver OpenBenchmarking.org MFLOPS, More Is Better Himeno Benchmark 3.0 Poisson Pressure Solver LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 400 800 1200 1600 2000 SE +/- 0.38, N = 3 SE +/- 1.44, N = 3 SE +/- 1.86, N = 3 SE +/- 1.15, N = 3 1671.60 1713.47 1714.84 2080.93 1. (CC) gcc options: -O3 -march=native
SciMark Computational Test: Sparse Matrix Multiply OpenBenchmarking.org Mflops, More Is Better SciMark 2.0 Computational Test: Sparse Matrix Multiply LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 600 1200 1800 2400 3000 SE +/- 3.56, N = 4 SE +/- 8.97, N = 4 SE +/- 3.13, N = 4 SE +/- 3.27, N = 4 2469.34 2779.39 2315.77 2317.41 1. (CXX) g++ options: -O3 -march=native
Parallel BZIP2 Compression 256MB File Compression OpenBenchmarking.org Seconds, Fewer Is Better Parallel BZIP2 Compression 1.1.6 256MB File Compression LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 1.2848 2.5696 3.8544 5.1392 6.424 SE +/- 0.02, N = 3 SE +/- 0.02, N = 3 SE +/- 0.04, N = 3 5.70 5.71 4.81 1. (CXX) g++ options: -O2 -pthread -lbz2 -lpthread
Botan Test: CAST-256 OpenBenchmarking.org Mbytes/s, More Is Better Botan 1.10.3 Test: CAST-256 LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 30 60 90 120 150 114.20 110.71 96.56 1. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2
Hierarchical INTegration Test: DOUBLE OpenBenchmarking.org QUIPs, More Is Better Hierarchical INTegration 1.0 Test: DOUBLE LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 150M 300M 450M 600M 750M SE +/- 497267.91, N = 3 SE +/- 1339446.23, N = 3 SE +/- 839463.16, N = 3 SE +/- 1772118.95, N = 3 599037509.43 588678410.65 679836110.18 689565776.59 1. (CC) gcc options: -O3 -march=native -lm
C-Ray Total Time OpenBenchmarking.org Seconds, Fewer Is Better C-Ray 1.1 Total Time LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 5 10 15 20 25 SE +/- 0.00, N = 3 SE +/- 0.01, N = 3 SE +/- 0.01, N = 3 SE +/- 0.01, N = 3 19.54 19.94 17.49 17.42 1. (CC) gcc options: -lm -lpthread -O3 -march=native
SciMark Computational Test: Monte Carlo OpenBenchmarking.org Mflops, More Is Better SciMark 2.0 Computational Test: Monte Carlo LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 140 280 420 560 700 SE +/- 0.54, N = 4 SE +/- 0.00, N = 4 SE +/- 0.00, N = 4 SE +/- 0.73, N = 4 632.55 637.24 577.28 572.28 1. (CXX) g++ options: -O3 -march=native
LAME MP3 Encoding WAV To MP3 OpenBenchmarking.org Seconds, Fewer Is Better LAME MP3 Encoding 3.99.3 WAV To MP3 LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 3 6 9 12 15 SE +/- 0.01, N = 5 SE +/- 0.02, N = 5 SE +/- 0.00, N = 5 SE +/- 0.01, N = 5 12.86 11.79 12.75 12.55 1. (CC) gcc options: -pipe -O3 -march=native -lm
Botan Test: X9.19-MAC OpenBenchmarking.org Mbytes/s, More Is Better Botan 1.10.3 Test: X9.19-MAC LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 20 40 60 80 100 83.84 79.86 86.57 1. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2
7-Zip Compression Compress Speed Test OpenBenchmarking.org MIPS, More Is Better 7-Zip Compression 9.20.1 Compress Speed Test LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 7K 14K 21K 28K 35K SE +/- 116.34, N = 3 SE +/- 263.12, N = 3 SE +/- 50.86, N = 3 SE +/- 193.19, N = 3 30761 30977 29344 29544 1. (CXX) g++ options: -pipe -lpthread
Botan Test: Twofish OpenBenchmarking.org Mbytes/s, More Is Better Botan 1.10.3 Test: Twofish LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 40 80 120 160 200 195.64 200.82 200.74 1. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2
SciMark Computational Test: Fast Fourier Transform OpenBenchmarking.org Mflops, More Is Better SciMark 2.0 Computational Test: Fast Fourier Transform LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 80 160 240 320 400 SE +/- 0.64, N = 4 SE +/- 0.40, N = 4 SE +/- 0.41, N = 4 SE +/- 0.82, N = 4 339.21 344.33 347.12 347.83 1. (CXX) g++ options: -O3 -march=native
N-Queens Elapsed Time OpenBenchmarking.org Seconds, Fewer Is Better N-Queens 1.0 Elapsed Time GCC 4.8.2 GCC 4.9.0 20131208 6 12 18 24 30 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 24.99 24.58 1. (CC) gcc options: -static -fopenmp -O3 -march=native
FFmpeg H.264 HD To NTSC DV OpenBenchmarking.org Seconds, Fewer Is Better FFmpeg 2.0 H.264 HD To NTSC DV LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 3 6 9 12 15 SE +/- 0.07, N = 3 SE +/- 0.22, N = 3 SE +/- 0.05, N = 3 SE +/- 0.19, N = 3 11.30 11.42 11.35 11.28 -Qunused-arguments -Qunused-arguments -fno-tree-vectorize -MF -MT -fno-tree-vectorize -MF -MT 1. (CC) gcc options: -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -ldl -lasound -lSDL -lm -pthread -O3 -march=native -std=c99 -fomit-frame-pointer -fno-math-errno -fno-signed-zeros -MMD
Apache Benchmark Static Web Page Serving OpenBenchmarking.org Requests Per Second, More Is Better Apache Benchmark 2.4.7 Static Web Page Serving LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 3K 6K 9K 12K 15K SE +/- 84.59, N = 3 SE +/- 85.10, N = 3 SE +/- 22.02, N = 3 SE +/- 61.95, N = 3 14690.90 14606.91 14621.88 14553.30 1. (CC) gcc options: -shared -fPIC -pthread -O3 -march=native
Botan Test: Tiger OpenBenchmarking.org Mbytes/s, More Is Better Botan 1.10.3 Test: Tiger LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 90 180 270 360 450 433.55 431.77 431.68 1. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2
Timed HMMer Search Pfam Database Search OpenBenchmarking.org Seconds, Fewer Is Better Timed HMMer Search 2.3.2 Pfam Database Search LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 2 4 6 8 10 SE +/- 0.01, N = 3 SE +/- 0.01, N = 3 SE +/- 0.01, N = 3 SE +/- 0.01, N = 3 8.71 8.70 8.73 8.70 1. (CC) gcc options: -O3 -march=native -pthread -lhmmer -lsquid -lm
NGINX Benchmark Static Web Page Serving OpenBenchmarking.org Requests Per Second, More Is Better NGINX Benchmark 1.0.11 Static Web Page Serving LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 4K 8K 12K 16K 20K SE +/- 6.21, N = 3 SE +/- 44.62, N = 3 SE +/- 49.87, N = 3 SE +/- 987.48, N = 6 18991.89 18974.45 18948.07 14991.69 1. (CC) gcc options: -lpthread -lcrypt -lcrypto -lz -O3 -march=native
Timed PHP Compilation Time To Compile OpenBenchmarking.org Seconds, Fewer Is Better Timed PHP Compilation 5.2.9 Time To Compile LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 5 10 15 20 25 SE +/- 0.37, N = 6 SE +/- 0.34, N = 6 SE +/- 0.05, N = 3 SE +/- 0.01, N = 3 15.26 13.50 20.81 21.53 1. (CC) gcc options: -O3 -march=native -pedantic -ldl -lz -lm
Phoronix Test Suite v10.8.5