Authors: Bowen Alpern, Anthony Cocchi, David Grove, and Derek Lieber
Citation: HPCN'01 Java Workshop
Virtual methods can be dispatched efficiently because the code for corresponding methods reside at the same entries in their respective virtual method tables (VMTs). To achieve efficient interface method dispatch, a fixed-sized interface method table (IMT) is associated with each class. Different implementations of the same interface method signature reside at the same entry in their respective IMTs. When a class implements two or more interface methods with the same IMT offset, a conflict resolution stub distinguishes between them at runtime. The resulting interface method dispatch is almost as cheap as its virtual counterpart.
Preprint PDF
