This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Strange behaviour in C++...
- To: mrs at wrs dot com (Mike Stump)
- Subject: Re: Strange behaviour in C++...
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Wed, 25 Aug 99 14:03:21 PDT
- Cc: law at cygnus dot com, oliva at dcc dot unicamp dot br, cj at interlog dot com, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
Jeff writes:
> > Just a note, thunks may be on their way out. I'm hearing more and
> > more people talk about the evils of thunks, particularly for high
> > end processors.
Mike Stump writes:
> Forget about talk, talk is cheap. What I have _never_ seen, are real
> performance numbers for real applications and/or micro benchmarks,
> that show what the numbers are.
I'd like to second Mike's comments. What you may be overlooking, Jeff, is
that the vast, vast majority of C++ objects are plain single inheritance,
which means that no thunks are needed and the non-thunks implementation
needs twice as much data space for the virtual function tables. So it
simply does not matter if thunks are slower, since thunks are rarely
called. It is a time-space tradeoff where the excess time cost is rare.