This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: EGCS: pointer to member functions.
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: EGCS: pointer to member functions.
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 23 Jun 1999 03:13:58 -0300
- Cc: mrs at wrs dot com (Mike Stump), brendan at dgs dot monash dot edu dot au, egcs at egcs dot cygnus dot com, martin at mira dot isdn dot cs dot tu-berlin dot de, egcs-patches at egcs dot cygnus dot com
- References: <199906171530.IAA14508@kankakee.wrs.com> <oriu8h1gr1.fsf@saci.lsd.dcc.unicamp.br> <u9pv2or9pf.fsf@yorick.cygnus.com>
On Jun 22, 1999, Jason Merrill <jason@cygnus.com> wrote:
> I'm really don't think this change is a good idea; going through a thunk
> costs more than a simple test. With branch prediction, the cost of the
> test is about zero, while the thunk adds an extra jump.
But the thunk would only be used for
pointer-to-virtual-member-function. With the current code, users are
paying the price of an additional test and branch even when they only
use pointer-to-non-virtual-member-function.
Moreover, even if the test cost is close to zero, it would still have
to branch, and, given that the `thunk' I have in mind is as simple as
a `trampoline', I don't see how it could be less efficient than the
current approach. Only if branches with good prediction were much
cheaper than a 100% certain jump; is this the case?
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists