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&sro.

LLVM 3.4 vs. GCC 4.9 Compiler BenchmarksProcessorMotherboardChipsetMemoryDiskGraphicsAudioMonitorNetworkOSKernelDesktopDisplay ServerDisplay DriverOpenGLCompilerFile-SystemScreen ResolutionLLVM Clang 3.3LLVM Clang 3.4 SVNGCC 4.8.2GCC 4.9.0 20131208Intel Core i7-4960X @ 4.00GHz (12 Cores)MSI X79MA-GD45 (MS-7738) v1.0Intel Xeon E5 v2/Core8192MB1000GB Seagate ST1000DX001-1CM1Sapphire AMD Radeon HD 4870 512MBRealtek ALC892DELL S2409WRealtek RTL8111/8168/8411Ubuntu 14.043.13.0-999-generic (x86_64)Unity 7.1.2X Server 1.14.4radeon 7.2.03.1 Mesa 10.0.0 Gallium 0.4Clang 3.3 + LLVM 3.3ext41920x1080Clang 3.4 (SVN 197046) + LLVM 3.4GCC 4.8.2GCC 4.9.0 20131208OpenBenchmarking.orgCompiler 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 Benchmarkshmmer: Pfam Database Searchblake2: Phoronix Test Suite v4.8.6botan: Tigerbotan: KASUMIbotan: AES-256botan: Twofishbotan: CAST-256botan: X9.19-MACscimark2: Compositescimark2: Monte Carloscimark2: Fast Fourier Transformscimark2: Sparse Matrix Multiplyscimark2: Dense LU Matrix Factorizationscimark2: Jacobi Successive Over-Relaxationhimeno: Poisson Pressure Solvercompress-7zip: Compress Speed Testbuild-mplayer: Time To Compilebuild-php: Time To Compilec-ray: Total Timecompress-pbzip2: 256MB File Compressionencode-flac: WAV To FLACencode-mp3: WAV To MP3ffmpeg: H.264 HD To NTSC DVhint: FLOAThint: DOUBLEnginx: Static Web Page Servingapache: Static Web Page Servingn-queens: Elapsed TimeLLVM Clang 3.3LLVM Clang 3.4 SVNGCC 4.8.2GCC 4.9.0 201312088.717.58433.5567.70192.16195.64114.2083.841531.29632.55339.212469.342489.311726.031671.603076115.2619.545.705.6512.8611.30277549891.07599037509.4318991.8914690.908.705.10431.7752.21202.80200.82110.7179.861986.97637.24344.332779.394449.091724.821713.47309773.1613.5019.945.714.8411.7911.42230228636.05588678410.6518974.4514606.918.735.30431.6876.59150.44200.7496.5686.571389.41577.28347.122315.772501.011205.851714.842934431.6220.8117.494.815.2912.7511.35337303850.89679836110.1818948.0714621.8824.998.705.321390.53572.28347.832317.412506.891208.222080.932954433.0721.5317.424.1112.5511.28340096979.25689565776.5914991.6914553.3024.58OpenBenchmarking.org

Timed HMMer Search

Pfam Database Search

OpenBenchmarking.orgSeconds, Fewer Is BetterTimed HMMer Search 2.3.2Pfam Database SearchGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN246810SE +/- 0.01, N = 3SE +/- 0.01, N = 3SE +/- 0.01, N = 3SE +/- 0.01, N = 38.738.708.718.701. (CC) gcc options: -O3 -march=native -pthread -lhmmer -lsquid -lm

BLAKE2

Phoronix Test Suite v4.8.6

OpenBenchmarking.orgCycles Per Byte, Fewer Is BetterBLAKE2 20121223Phoronix Test Suite v4.8.6GCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN246810SE +/- 0.00, N = 3SE +/- 0.00, N = 3SE +/- 0.01, N = 3SE +/- 0.08, N = 65.305.327.585.101. (CC) gcc options: -std=gnu99 -O3 -march=native -lcrypto -lz

Botan

Test: Tiger

OpenBenchmarking.orgMbytes/s, More Is BetterBotan 1.10.3Test: TigerGCC 4.8.2LLVM Clang 3.3LLVM Clang 3.4 SVN90180270360450431.68433.55431.771. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2

Botan

Test: KASUMI

OpenBenchmarking.orgMbytes/s, More Is BetterBotan 1.10.3Test: KASUMIGCC 4.8.2LLVM Clang 3.3LLVM Clang 3.4 SVN2040608010076.5967.7052.211. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2

Botan

Test: AES-256

OpenBenchmarking.orgMbytes/s, More Is BetterBotan 1.10.3Test: AES-256GCC 4.8.2LLVM Clang 3.3LLVM Clang 3.4 SVN4080120160200150.44192.16202.801. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2

Botan

Test: Twofish

OpenBenchmarking.orgMbytes/s, More Is BetterBotan 1.10.3Test: TwofishGCC 4.8.2LLVM Clang 3.3LLVM Clang 3.4 SVN4080120160200200.74195.64200.821. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2

Botan

Test: CAST-256

OpenBenchmarking.orgMbytes/s, More Is BetterBotan 1.10.3Test: CAST-256GCC 4.8.2LLVM Clang 3.3LLVM Clang 3.4 SVN30609012015096.56114.20110.711. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2

Botan

Test: X9.19-MAC

OpenBenchmarking.orgMbytes/s, More Is BetterBotan 1.10.3Test: X9.19-MACGCC 4.8.2LLVM Clang 3.3LLVM Clang 3.4 SVN2040608010086.5783.8479.861. (CXX) g++ options: -m64 -ldl -lpthread -lrt -O2

SciMark

Computational Test: Composite

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: CompositeGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN400800120016002000SE +/- 1.82, N = 4SE +/- 1.83, N = 4SE +/- 1.54, N = 4SE +/- 1.51, N = 41389.411390.531531.291986.971. (CXX) g++ options: -O3 -march=native

SciMark

Computational Test: Monte Carlo

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Monte CarloGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN140280420560700SE +/- 0.00, N = 4SE +/- 0.73, N = 4SE +/- 0.54, N = 4SE +/- 0.00, N = 4577.28572.28632.55637.241. (CXX) g++ options: -O3 -march=native

SciMark

Computational Test: Fast Fourier Transform

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Fast Fourier TransformGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN80160240320400SE +/- 0.41, N = 4SE +/- 0.82, N = 4SE +/- 0.64, N = 4SE +/- 0.40, N = 4347.12347.83339.21344.331. (CXX) g++ options: -O3 -march=native

SciMark

Computational Test: Sparse Matrix Multiply

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Sparse Matrix MultiplyGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN6001200180024003000SE +/- 3.13, N = 4SE +/- 3.27, N = 4SE +/- 3.56, N = 4SE +/- 8.97, N = 42315.772317.412469.342779.391. (CXX) g++ options: -O3 -march=native

SciMark

Computational Test: Dense LU Matrix Factorization

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Dense LU Matrix FactorizationGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN10002000300040005000SE +/- 5.62, N = 4SE +/- 5.63, N = 4SE +/- 2.90, N = 4SE +/- 4.65, N = 42501.012506.892489.314449.091. (CXX) g++ options: -O3 -march=native

SciMark

Computational Test: Jacobi Successive Over-Relaxation

OpenBenchmarking.orgMflops, More Is BetterSciMark 2.0Computational Test: Jacobi Successive Over-RelaxationGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN400800120016002000SE +/- 1.18, N = 4SE +/- 1.19, N = 4SE +/- 1.21, N = 4SE +/- 1.40, N = 41205.851208.221726.031724.821. (CXX) g++ options: -O3 -march=native

Himeno Benchmark

Poisson Pressure Solver

OpenBenchmarking.orgMFLOPS, More Is BetterHimeno Benchmark 3.0Poisson Pressure SolverGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN400800120016002000SE +/- 1.86, N = 3SE +/- 1.15, N = 3SE +/- 0.38, N = 3SE +/- 1.44, N = 31714.842080.931671.601713.471. (CC) gcc options: -O3 -march=native

7-Zip Compression

Compress Speed Test

OpenBenchmarking.orgMIPS, More Is Better7-Zip Compression 9.20.1Compress Speed TestGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN7K14K21K28K35KSE +/- 50.86, N = 3SE +/- 193.19, N = 3SE +/- 116.34, N = 3SE +/- 263.12, N = 3293442954430761309771. (CXX) g++ options: -pipe -lpthread

Timed MPlayer Compilation

Time To Compile

OpenBenchmarking.orgSeconds, Fewer Is BetterTimed MPlayer Compilation 1.0-rc3Time To CompileGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.4 SVN816243240SE +/- 0.19, N = 3SE +/- 0.24, N = 3SE +/- 0.05, N = 431.6233.073.16

Timed PHP Compilation

Time To Compile

OpenBenchmarking.orgSeconds, Fewer Is BetterTimed PHP Compilation 5.2.9Time To CompileGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN510152025SE +/- 0.05, N = 3SE +/- 0.01, N = 3SE +/- 0.37, N = 6SE +/- 0.34, N = 620.8121.5315.2613.501. (CC) gcc options: -O3 -march=native -pedantic -ldl -lz -lm

C-Ray

Total Time

OpenBenchmarking.orgSeconds, Fewer Is BetterC-Ray 1.1Total TimeGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN510152025SE +/- 0.01, N = 3SE +/- 0.01, N = 3SE +/- 0.00, N = 3SE +/- 0.01, N = 317.4917.4219.5419.941. (CC) gcc options: -lm -lpthread -O3 -march=native

Parallel BZIP2 Compression

256MB File Compression

OpenBenchmarking.orgSeconds, Fewer Is BetterParallel BZIP2 Compression 1.1.6256MB File CompressionGCC 4.8.2LLVM Clang 3.3LLVM Clang 3.4 SVN1.28482.56963.85445.13926.424SE +/- 0.04, N = 3SE +/- 0.02, N = 3SE +/- 0.02, N = 34.815.705.711. (CXX) g++ options: -O2 -pthread -lbz2 -lpthread

FLAC Audio Encoding

WAV To FLAC

OpenBenchmarking.orgSeconds, Fewer Is BetterFLAC Audio Encoding 1.3.0WAV To FLACGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN1.27132.54263.81395.08526.3565SE +/- 0.00, N = 5SE +/- 0.00, N = 5SE +/- 0.00, N = 5SE +/- 0.00, N = 55.294.115.654.841. (CXX) g++ options: -O3 -march=native -fvisibility=hidden -logg -lm

LAME MP3 Encoding

WAV To MP3

OpenBenchmarking.orgSeconds, Fewer Is BetterLAME MP3 Encoding 3.99.3WAV To MP3GCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN3691215SE +/- 0.00, N = 5SE +/- 0.01, N = 5SE +/- 0.01, N = 5SE +/- 0.02, N = 512.7512.5512.8611.791. (CC) gcc options: -pipe -O3 -march=native -lm

FFmpeg

H.264 HD To NTSC DV

OpenBenchmarking.orgSeconds, Fewer Is BetterFFmpeg 2.0H.264 HD To NTSC DVGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN3691215SE +/- 0.05, N = 3SE +/- 0.19, N = 3SE +/- 0.07, N = 3SE +/- 0.22, N = 311.3511.2811.3011.42-fno-tree-vectorize -MF -MT-fno-tree-vectorize -MF -MT-Qunused-arguments-Qunused-arguments1. (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.orgQUIPs, More Is BetterHierarchical INTegration 1.0Test: FLOATGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN70M140M210M280M350MSE +/- 429948.29, N = 3SE +/- 253360.03, N = 3SE +/- 426397.20, N = 3SE +/- 87866.73, N = 3337303850.89340096979.25277549891.07230228636.051. (CC) gcc options: -O3 -march=native -lm

Hierarchical INTegration

Test: DOUBLE

OpenBenchmarking.orgQUIPs, More Is BetterHierarchical INTegration 1.0Test: DOUBLEGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN150M300M450M600M750MSE +/- 839463.16, N = 3SE +/- 1772118.95, N = 3SE +/- 497267.91, N = 3SE +/- 1339446.23, N = 3679836110.18689565776.59599037509.43588678410.651. (CC) gcc options: -O3 -march=native -lm

NGINX Benchmark

Static Web Page Serving

OpenBenchmarking.orgRequests Per Second, More Is BetterNGINX Benchmark 1.0.11Static Web Page ServingGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN4K8K12K16K20KSE +/- 49.87, N = 3SE +/- 987.48, N = 6SE +/- 6.21, N = 3SE +/- 44.62, N = 318948.0714991.6918991.8918974.451. (CC) gcc options: -lpthread -lcrypt -lcrypto -lz -O3 -march=native

Apache Benchmark

Static Web Page Serving

OpenBenchmarking.orgRequests Per Second, More Is BetterApache Benchmark 2.4.7Static Web Page ServingGCC 4.8.2GCC 4.9.0 20131208LLVM Clang 3.3LLVM Clang 3.4 SVN3K6K9K12K15KSE +/- 22.02, N = 3SE +/- 61.95, N = 3SE +/- 84.59, N = 3SE +/- 85.10, N = 314621.8814553.3014690.9014606.911. (CC) gcc options: -shared -fPIC -pthread -O3 -march=native

N-Queens

Elapsed Time

OpenBenchmarking.orgSeconds, Fewer Is BetterN-Queens 1.0Elapsed TimeGCC 4.8.2GCC 4.9.0 20131208612182430SE +/- 0.00, N = 3SE +/- 0.00, N = 324.9924.581. (CC) gcc options: -static -fopenmp -O3 -march=native


Phoronix Test Suite v10.8.5