Is G++ getting slower over time?

A rather common complaint about GCC, the GNU C/C++/Java/etc. compiler suite, is that each new release is slower than the last.  To verify this, I ran some tests building LLVM 2.8’s code-generation support library which seemed a fair benchmark given that it’s a sizable collection of C++ code.

As results below indicate, looking at all versions of g++ from 3.4 to the current development source (‘trunk’), there has been an overall slowdown between g++ 3.4 (released in 2004) and current trunk (to be released in earl 2013) at both the standard (-O2 -g) and optimized (-O3) build level, but in-between versions have fluctuated.  g++ 4.0 improved in almost all respects on g++ 3.4, and version 4.3 and 4.4 offered some speedups over their predecessors.  More recent g++ versions, starting with 4.5, have been steadily getting slower, by an amount varying between 5% and 20% with each release.

GCC chart

The chart is of time to compile the test (in seconds).  Lower is better.

Comments are closed.