This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: EGCS: pointer to member functions.


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.  This idea should
not go into projects.html.

The only reason to use thunks is to avoid paying for MI in single
inheritance code; for code that actually needs adjustments, offsets in the
vtable are a faster solution on modern architectures.  Which solution you
choose for calling virtual functions depends on how you view the tradeoff.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]