Earlier this month benchmarks were published on Phoronix showing the GCC 4.6 compiler performance with AVX support under Intel's new Sandy Bridge processors that are the first to provide Advanced Vector Extensions support. The Core i5 2500K CPU performance is already great under Linux, but once more Linux software supports taking advantage of this latest cross-vendor instruction set, there will be even more speed-ups. While the Low-Level Virtual Machine does not yet have full support for taking advantage of the Advanced Vector Extensions support, in this article we are looking at how the latest development code for LLVM 2.9 and the Clang compiler are performing on Intel's Sandy Bridge in relation to GCC.
After running the tests earlier this month of GCC 4.6 AVX on the System76 Serval Professional boasting the Intel Core i7 2820QM mobile "Sandy Bridge" CPU, LLVM with Clang was tested immediately following that. The LLVM and Clang source-code was pulled from the SVN repository on the 5th of February and then built with assertions disabled and as a release build (rather than debugging). Accompanying these results are the GCC 4.5.2, GCC 4.6.0 snapshot, and the same GCC 4.6.0 snapshot with the Core i7 AVX support enabled.
The specifications on this System76 Serval Professional testing notebook includes the Intel Core i7 2820QM CPU clocked at 2.30GHz with four physical cores plus Intel Hyper Threading, 8GB of system memory, an 80GB Intel SSDSA2M080 solid-state drive, and NVIDIA GeForce GTX 485M 2GB graphics. The operating system was Ubuntu 10.10 with the Linux 2.6.38 kernel snapshot.
Published test results include the timed Apache compilation, Apache web-server performance, PostgreSQL, John The Ripper, C-Ray, POV-Ray, Himeno, MAFFT, MrBayes, HMMer, x264, Bullet, FLAC, GraphicsMagick, and OpenSSL. Benchmarking was done via Phoronix Test Suite 3.0-Iveland and results are hosted on OpenBenchmarking.org.
When looking at simply the time to build the Apache 2.2 web-server, the LLVM Clang code from this month pulled in right behind GCC 4.6 when it was built with the corei7-avx support. The LLVM Clang compiler, without any extra flags, was well in front of GCC 4.5.2 and GCC 4.6.0 in a similar stock configuration.
The Apache web-server when built with LLVM-Clang also did the best and carried a slight advantage over the stock GCC 4.5.2/4.6.0 snapshot while the corei7-avx performance had regressed in comparison.
The LLVM Clang performance with PostgreSQL was on par with GCC 4.6.0, but slightly behind that of GCC 4.6.0 when optimized with the corei7-avx support and of a stock GCC 4.5.2 installation.