Stepanov results with development gcc

Joe Buck jbuck@racerx.synopsys.com
Fri Dec 8 12:03:00 GMT 2000


> 	Something seems strange with these results.  2.95.1 was perfect?
> 2.95.2 was perfect?

Pretty nearly.  (On the Sparc we see a score well below 1.0 because the
simple loop is badly misoptimized).

The Stepanov test has a flaw: every single abstract object it contains
is a class or struct with exactly one field, which is either a double
or a pointer.  Jason's ADDRESSOF optimization takes care of that very
nicely.  This makes gcc 2.95.2 look misleadingly good.  For any object
that has more than one field that is passed by reference to an inline
function, gcc 2.95.2 does quite poorly compared with, say, KAI.

However, fortunately many C++ objects do have one field (e.g. iterators,
reference-counted strings, etc) so things are not too bad.

ADDRESSOF got broken badly in snapshots; as a result gcc 2.96RH generates
horrific STL code (a factor 2x or 3x penalty for many simple inner loops).
Jason sent in a patch that greatly improves things, but it seems that
we're still not as good as 2.95.2.

> 	My results for abstraction penalty using gcc -O2 on AIX are:
> 
> 	gcc-2.95.2 = 1.23-1.24
> 	gcc-2.95.3 = 1.22-1.29
> 
> 	I do not have a current development gcc to test.
> 
> David
> 



More information about the Gcc mailing list