Last week GCC 4.5.0 entered the world with improvements to the experimental C++0x support, Graphite-powered automatic parallelization support, compatibility with new ARM processors, Intel Atom and AMD Orochi optimizations, link-time optimization, and GCC plug-in support. Over the weekend we decided to benchmark this major update to the GNU Compiler Collection to see how its performance compares to that of GCC 4.3 and 4.4.
GCC 4.4.0 was released in April of 2009 while GCC 4.3.0 made it out in March of 2009. We could not benchmark any release older than GCC 4.3.0 due to build problems on Ubuntu 10.04 LTS. We built GCC 4.3.0, 4.4.0, and 4.5.0 from source on Ubuntu 10.04 with the only configuration being defining the x86_64-linux-gnu target and leaving all other options at their defaults. All three versions of GCC were built using Ubuntu's GCC 4.4.3 installation. For those interested in how LLVM/Clang is now performing against GCC 4.5, we will have such benchmarks of LLVM-GCC and LLVM Clang later this week compared to these GCC 4.3/4.4/4.5 numbers.
The test system was a Lenovo ThinkPad T61 with an Intel Core 2 Duo T9300 "Penryn" processor clocked at 2.50GHz, 4GB of DDR3 system memory, a 100GB Hitachi HTS72201 Serial ATA 2.0 7200RPM hard drive, and NVIDIA Quadro NVS 140M graphics. Our Ubuntu 10.04 development snapshot was the x86_64 version and used the Linux 2.6.32-20-generic kernel, GNOME 2.30.0, X.Org Server 1.7.6, NVIDIA 195.36.15 display driver, and the default EXT4 file-system.
We began our testing by first measuring the time it took each GCC release to build Apache, PHP, and ImageMagick. After comparing the times it took to build these three popular free software programs, the rest of our testing was looking at the performance of different benchmarks being built from source with the respective GCC releases to examine the performance of the generated binaries. These tests included 7-Zip compression, LAME MP3 encoding, x264, Gcrypt, OpenSSL, C-Ray, GraphicsMagick, Bullet Physics Engine, John The Ripper, timed HMMER search, and NAS Parallel Benchmarks. All of this testing was facilitated by the Phoronix Test Suite.