This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Stepanov results with development gcc
- To: dje at watson dot ibm dot com (David Edelsohn)
- Subject: Re: Stepanov results with development gcc
- From: Joe Buck <jbuck at racerx dot synopsys dot com>
- Date: Fri, 8 Dec 2000 12:02:49 -0800 (PST)
- Cc: lucier at math dot purdue dot edu (Brad Lucier), gcc at gcc dot gnu dot org
> 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
>