<p>We have been looking at g++ versions 3.2.3 and 4.2.4.  With 4.2.4, the performance improvements on some of our code base is significant.</p>

<p>I've tried searching the <a href="http://gcc.gnu.org/bugzilla/" rel="nofollow noreferrer">gcc buzilla database</a> to find hints as to what bugs may have had such a dramatic improvement but I didn't find any individual bug that stood out as being a candidate.</p>

<p>Are the improvements the result of many small changes that have slowly had an affect?  Or was there say a top 5 set of improvements that may have made a difference?</p>

<p>For some background, our code base does make good use of STL containers and algorithms, as well as C++ features such as the 'inline' keyword.</p>

In my experience, 3.4 is where the performance basically peaked; 4.2 is actually slower than 3.4 on my project, with 4.3 being the first to roughly equal 3.4's performance.  4.4 is slightly faster than 3.4.
There are a specific few cases I've found where older versions of gcc did some unbelievably retarded things in code--there was a particular function that went from 128 to 21 clocks from 3.4 to 4.3, but that was obviously a special case (it was a short loop where the addition of just a few unnecessary instructions massively hurt performance).
I personally use 3.4 just because it compiles so much faster, making testing much quicker.  I also try to avoid the latest versions because they seem to have nasty habits of miscompiling code; --march core2 on recent gcc versions causes segfaults in my program, for example, because it emits autovectorized code that tries to perform aligned accesses on unaligned addresses.
Overall though the differences are rarely large; 3-5% is the absolute
most
I've seen in terms of performance change.
Now, note this is C; things may be different in C++.