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 .
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 hmmer: Pfam Database Search blake2: Phoronix Test Suite v4.8.6 botan: Tiger botan: KASUMI botan: AES-256 botan: Twofish botan: CAST-256 botan: X9.19-MAC scimark2: Composite scimark2: Monte Carlo scimark2: Fast Fourier Transform scimark2: Sparse Matrix Multiply scimark2: Dense LU Matrix Factorization scimark2: Jacobi Successive Over-Relaxation himeno: Poisson Pressure Solver compress-7zip: Compress Speed Test build-mplayer: Time To Compile build-php: Time To Compile c-ray: Total Time compress-pbzip2: 256MB File Compression encode-flac: WAV To FLAC encode-mp3: WAV To MP3 ffmpeg: H.264 HD To NTSC DV hint: FLOAT hint: DOUBLE nginx: Static Web Page Serving apache: Static Web Page Serving n-queens: Elapsed Time LLVM Clang 3.3 LLVM Clang 3.4 SVN GCC 4.8.2 GCC 4.9.0 20131208 8.71 7.58 433.55 67.70 192.16 195.64 114.20 83.84 1531.29 632.55 339.21 2469.34 2489.31 1726.03 1671.60 30761 15.26 19.54 5.70 5.65 12.86 11.30 277549891.07 599037509.43 18991.89 14690.90 8.70 5.10 431.77 52.21 202.80 200.82 110.71 79.86 1986.97 637.24 344.33 2779.39 4449.09 1724.82 1713.47 30977 3.16 13.50 19.94 5.71 4.84 11.79 11.42 230228636.05 588678410.65 18974.45 14606.91 8.73 5.30 431.68 76.59 150.44 200.74 96.56 86.57 1389.41 577.28 347.12 2315.77 2501.01 1205.85 1714.84 29344 31.62 20.81 17.49 4.81 5.29 12.75 11.35 337303850.89 679836110.18 18948.07 14621.88 24.99 8.70 5.32 1390.53 572.28 347.83 2317.41 2506.89 1208.22 2080.93 29544 33.07 21.53 17.42 4.11 12.55 11.28 340096979.25 689565776.59 14991.69 14553.30 24.58 OpenBenchmarking.org
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Phoronix Test Suite v10.8.5