Clang 3.4 Performance Very Strong Against GCC 4.9
Written by Michael Larabel in Software on 30 December 2013. Page 1 of 1. 12 Comments

After earlier this month delivering LLVM Clang 3.3/3.4 benchmarks for the new compiler infrastructure out of Apple, today are results that directly compare the new LLVM Clang 3.4 performance against the stable GCC 4.8.2 compiler and GCC 4.9.0 development compiler under various C/C++ benchmarks.

Today's test results to end out 2013 build upon the earlier Clang 3.3/3.4 testing on the Intel Core i7 4960X "Ivy Bridge" Extreme Edition system running Ubuntu 14.04 (development) with the Linux 3.13 kernel. Like LLVM/Clang, GCC 4.8.2 and GCC 4.9.0 20131208 were compiled for C/C++ support in their release/optimized modes.

All of this benchmarking was handled via the Phoronix Test Suite. The CFLAGS/CXXFLAGS set during testing were "-O3 -march=native" for all four compiler configurations.

The BLAKE2 performance improvement in Clang 3.4 now puts the compiler performance in line with GCC 4.8.2, which is still on the same level with GCC 4.9 SVN.

The AES-256 performance in Botan is beating out GCC 4.8.2. GCC 4.9.0 failed to build under the Botan 1.10.3 stable release.

The other Botan crypto benchmarks were mixed but overall LLVM Clang 3.4 is having a competitive showing against GCC 4.8.2. GCC 4.9 will be officially released in H1'2014.

With the Clang 3.4 gains made in the C-written SciMark2 test cases, Clang 3.4 is now much faster than GCC 4.8.2 and even the GCC 4.9.0 development compiler.

SciMark's Monte Carlo performance is faster when compiled under Clang than under GCC.

The Sparse Matrix Multiply performance is 20% faster on the Core i7 4960X Ubuntu system with LLVM Clang 3.4 than GCC 4.8/4.9.

The biggest gain made with Clang is in the Dense LU Matrix Factorization where its performance is almost 80% faster than GCC and Clang 3.3.

The Jacobi Successive Over-Relaxation test in SciMark2 also did much better with Clang than GCC.

The Clang 3.4 performance for the Himeno scientific test is in line with GCC 4.8.2, but GCC 4.9.0 speeds ahead for this Poisson pressure solver to command the lead.

LLVM Clang easily wins over GCC when it comes to compile times... Clang is very well known for its very speedy compile times and surprisingly with Clang 3.4 the compile times can be even faster than Clang 3.3.

GCC still has a small lead over Clang when it comes to the multi-threaded C-Ray ray-tracer.

GCC is faster for the Parallel BZIP2 compression test, but PBZIP2 failed to build with the GCC 4.9 snapshot that was tested.

The FLAC audio encoding is faster when built under GCC 4.9 than with GCC 4.8 or Clang 3.4.

GCC is also faster than LLVM's Clang open-source C/C++ compiler on the Intel Core i7 4960X EE Linux system when running the Hierarchical Integration benchmarks.

Clang 3.4 offered faster performance of compiled C/C++ code in several areas but GCC 4.9 also brings some performance improvements of its own over the current stable release. Clang still certainly outperforms GCC when it comes to compile times, but aside from that the compiler performance competition is rather mixed depending upon the particular code-base, workload, and processor.

For being a much younger project than GCC, LLVM/Clang is certainly running nicely and now building with almost all C/C++ code-bases tossed its way, and with the 3.4 release it's one step closer to having performance parity (or superiority) to the GNU Compiler Collection on modern x86 CPUs.

You can easily run your own compiler benchmarks for your intended workloads and software/hardware configurations via the Phoronix Test Suite with the hundreds of test profiles offered via

About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter or contacted via

Related Articles
Trending Linux News