EGCS: pointer to member functions.

Jason Merrill
Tue Jun 22 00:11:00 GMT 1999

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.


More information about the Gcc-patches mailing list