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&rdt .
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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 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.4 (SVN 197046) + LLVM 3.4 ext4 1920x1080 Clang 3.3 + LLVM 3.3 GCC 4.9.0 20131208 GCC 4.8.2 OpenBenchmarking.org Compiler Details - 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 - LLVM Clang 3.3: Optimized build; Built Dec 11 2013 (09:55:18); Default target: x86_64-unknown-linux-gnu; Host CPU: x86-64 - GCC 4.9.0 20131208: --enable-checking=release --enable-languages=c,c++ - GCC 4.8.2: --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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 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 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 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 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 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.9.0 20131208 GCC 4.8.2 8 16 24 32 40 SE +/- 0.05, N = 4 SE +/- 0.24, N = 3 SE +/- 0.19, N = 3 3.16 33.07 31.62
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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 1000 2000 3000 4000 5000 SE +/- 4.65, N = 4 SE +/- 2.90, N = 4 SE +/- 5.63, N = 4 SE +/- 5.62, N = 4 4449.09 2489.31 2506.89 2501.01 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 2 4 6 8 10 SE +/- 0.08, N = 6 SE +/- 0.01, N = 3 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 5.10 7.58 5.32 5.30 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 70M 140M 210M 280M 350M SE +/- 87866.73, N = 3 SE +/- 426397.20, N = 3 SE +/- 253360.03, N = 3 SE +/- 429948.29, N = 3 230228636.05 277549891.07 340096979.25 337303850.89 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.4 SVN LLVM Clang 3.3 GCC 4.8.2 20 40 60 80 100 52.21 67.70 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 400 800 1200 1600 2000 SE +/- 1.40, N = 4 SE +/- 1.21, N = 4 SE +/- 1.19, N = 4 SE +/- 1.18, N = 4 1724.82 1726.03 1208.22 1205.85 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 400 800 1200 1600 2000 SE +/- 1.51, N = 4 SE +/- 1.54, N = 4 SE +/- 1.83, N = 4 SE +/- 1.82, N = 4 1986.97 1531.29 1390.53 1389.41 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 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 4.84 5.65 4.11 5.29 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.4 SVN LLVM Clang 3.3 GCC 4.8.2 40 80 120 160 200 202.80 192.16 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 400 800 1200 1600 2000 SE +/- 1.44, N = 3 SE +/- 0.38, N = 3 SE +/- 1.15, N = 3 SE +/- 1.86, N = 3 1713.47 1671.60 2080.93 1714.84 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 600 1200 1800 2400 3000 SE +/- 8.97, N = 4 SE +/- 3.56, N = 4 SE +/- 3.27, N = 4 SE +/- 3.13, N = 4 2779.39 2469.34 2317.41 2315.77 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.4 SVN LLVM Clang 3.3 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.71 5.70 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.4 SVN LLVM Clang 3.3 GCC 4.8.2 30 60 90 120 150 110.71 114.20 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 150M 300M 450M 600M 750M SE +/- 1339446.23, N = 3 SE +/- 497267.91, N = 3 SE +/- 1772118.95, N = 3 SE +/- 839463.16, N = 3 588678410.65 599037509.43 689565776.59 679836110.18 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 5 10 15 20 25 SE +/- 0.01, N = 3 SE +/- 0.00, N = 3 SE +/- 0.01, N = 3 SE +/- 0.01, N = 3 19.94 19.54 17.42 17.49 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 140 280 420 560 700 SE +/- 0.00, N = 4 SE +/- 0.54, N = 4 SE +/- 0.73, N = 4 SE +/- 0.00, N = 4 637.24 632.55 572.28 577.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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 3 6 9 12 15 SE +/- 0.02, N = 5 SE +/- 0.01, N = 5 SE +/- 0.01, N = 5 SE +/- 0.00, N = 5 11.79 12.86 12.55 12.75 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.4 SVN LLVM Clang 3.3 GCC 4.8.2 20 40 60 80 100 79.86 83.84 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 7K 14K 21K 28K 35K SE +/- 263.12, N = 3 SE +/- 116.34, N = 3 SE +/- 193.19, N = 3 SE +/- 50.86, N = 3 30977 30761 29544 29344 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.4 SVN LLVM Clang 3.3 GCC 4.8.2 40 80 120 160 200 200.82 195.64 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 80 160 240 320 400 SE +/- 0.40, N = 4 SE +/- 0.64, N = 4 SE +/- 0.82, N = 4 SE +/- 0.41, N = 4 344.33 339.21 347.83 347.12 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.9.0 20131208 GCC 4.8.2 6 12 18 24 30 SE +/- 0.00, N = 3 SE +/- 0.00, N = 3 24.58 24.99 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 3 6 9 12 15 SE +/- 0.22, N = 3 SE +/- 0.07, N = 3 SE +/- 0.19, N = 3 SE +/- 0.05, N = 3 11.42 11.30 11.28 11.35 -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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 3K 6K 9K 12K 15K SE +/- 85.10, N = 3 SE +/- 84.59, N = 3 SE +/- 61.95, N = 3 SE +/- 22.02, N = 3 14606.91 14690.90 14553.30 14621.88 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.4 SVN LLVM Clang 3.3 GCC 4.8.2 90 180 270 360 450 431.77 433.55 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 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.70 8.71 8.70 8.73 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 4K 8K 12K 16K 20K SE +/- 44.62, N = 3 SE +/- 6.21, N = 3 SE +/- 987.48, N = 6 SE +/- 49.87, N = 3 18974.45 18991.89 14991.69 18948.07 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.4 SVN LLVM Clang 3.3 GCC 4.9.0 20131208 GCC 4.8.2 5 10 15 20 25 SE +/- 0.34, N = 6 SE +/- 0.37, N = 6 SE +/- 0.01, N = 3 SE +/- 0.05, N = 3 13.50 15.26 21.53 20.81 1. (CC) gcc options: -O3 -march=native -pedantic -ldl -lz -lm
Phoronix Test Suite v10.8.5