Object-oriented systems must implement message dispatch efficiently in order not to penalize the object-oriented programming style. We characterize the performance of most previously published dispatch techniques for both statically- and dynamically-typed languages with both single and multiple inheritance. Hardware organization (in particular, branch latency and superscalar instruction issue) significantly impacts dispatch performance. For example, inline caching may outperform c++-style "vtables" on deeply pipelined processors even though it executes more instructions per dispatch. We also show that adding support for dynamic typing or multiple inheritance does not significantly impact dispatch speed for most techniques, especially on superscalar machines. Also, instruction space overhead (calling sequences) can exceed the space cost of data structures (dispatch tables), so that minimal table size may not imply minimal run-time space usage.
Cited By
- Gil J and Zibin Y (2007). Efficient dynamic dispatching with type slicing, ACM Transactions on Programming Languages and Systems, 30:1, (5-es), Online publication date: 1-Nov-2007.
- Zibin Y and Gil J Fast algorithm for creating space efficient dispatching tables with application to multi-dispatching Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (142-160)
- Zibin Y and Gil J (2019). Fast algorithm for creating space efficient dispatching tables with application to multi-dispatching, ACM SIGPLAN Notices, 37:11, (142-160), Online publication date: 17-Nov-2002.
Recommendations
Balancing ILP and TLP in SMT Architectures through Out-of-Order Instruction Dispatch
ICPP '06: Proceedings of the 2006 International Conference on Parallel ProcessingSimultaneous Multi-threading (SMT) architectures open up new avenues for datapath optimizations due to the presence of thread-level parallelism (TLP). One recent proposal for exploiting such parallelism is the 2OP_BLOCK scheduler design, which ...