Message Dispatch on Pipelined Processors

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. 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.

[1]  Craig Chambers,et al.  An efficient implementation of SELF a dynamically-typed object-oriented language based on prototypes , 1989, OOPSLA 1989.

[2]  Dirk Grunwald,et al.  Reducing indirect function call overhead in C++ programs , 1994, POPL '94.

[3]  David Ungar,et al.  The design and evaluation of a high performance Smalltalk system , 1987 .

[4]  David A. Patterson,et al.  What Price Smalltalk? , 1987, Computer.

[5]  Stein Krogdahl Multiple inheritance in Simula-like languages , 1985, BIT Comput. Sci. Sect..

[6]  Urs Hölzle,et al.  Optimizing dynamically-dispatched calls with run-time type feedback , 1994, PLDI '94.

[7]  Urs Hölzle,et al.  Adaptive optimization for self: reconciling high performance with exploratory programming , 1994 .

[8]  Craig Chambers,et al.  An efficient implementation of SELF, a dynamically-typed object-oriented language based on prototypes , 1989, OOPSLA '89.

[9]  Terry A. McKee,et al.  OOPSLA '89 Conference proceedings on Object-oriented programming systems, languages and applications , 1989 .

[10]  Terry A. McKee,et al.  A fast method dispatcher for compiled languages with multiple inheritance , 1989, OOPSLA 1989.

[11]  Andreas Paepcke Object-oriented programming: the CLOS perspective , 1993 .

[12]  Karel Driesen Selector table indexing & sparse arrays , 1993, OOPSLA '93.

[13]  Craig Chambers,et al.  Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches , 1991, ECOOP.

[14]  Daniel H. H. Ingalls A simple technique for handling multiple polymorphism , 1986, OOPSLA 1986.

[15]  John R. Rose,et al.  Fast dispatch mechanisms for stock hardware , 1988, Conference on Object-Oriented Programming Systems, Languages, and Applications.

[16]  Karel Driesen,et al.  Minimizing row displacement dispatch tables , 1995, OOPSLA.

[17]  Karel Driesen Method Lookup Strategies in Dynamically Typed Object-Oriented Programming Languages , 1993 .

[18]  Glenn Krasner,et al.  Smalltalk-80: bits of history, words of advice , 1983 .

[19]  Jens Palsberg,et al.  Analysis of Objects with Dynamic and Multiple Inheritance , 1993 .

[20]  L. Peter Deutsch,et al.  Efficient implementation of the smalltalk-80 system , 1984, POPL.

[21]  Jens Palsberg,et al.  Making Type Inference Practical , 1992, ECOOP.

[22]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[23]  Craig Chambers,et al.  Parents are shared parts of objects: Inheritance and encapsulation in SELF , 1991, LISP Symb. Comput..

[24]  Patrick H. Dussud TICLOS: an implementation of CLOS for the explorer family , 1989, OOPSLA '89.

[25]  Mary F. Fernández,et al.  Simple and effective link-time optimization of Modula-3 programs , 1995, PLDI '95.

[26]  Urs Hölzle,et al.  Type feedback vs. concrete type inference: a comparison of optimization techniques for object-oriented languages , 1995, OOPSLA.

[27]  Gregor Kiczales,et al.  Efficient method dispatch in PCL , 1990, LISP and Functional Programming.

[28]  Bjarne Stroustrup,et al.  The Annotated C++ Reference Manual , 1990 .

[29]  Peter Dencker,et al.  Optimization of parser tables for portable compilers , 1984, TOPL.

[30]  R. Nigel Horspool,et al.  Taming Message Passing: Efficient Method Look-Up for Dynamically Typed Languages , 1994, ECOOP.

[31]  R. Nigel Horspool,et al.  Compile-Time Analysis of Object-Oriented Programs , 1992, CC.

[32]  Jens Palsberg,et al.  Type Inference of SELF , 1993, ECOOP.

[33]  Olivier Gruber,et al.  Optimizing Multi-Method Dispach Using Compressed Dispach Tables , 1994, BDA.

[34]  Heinz Schmidt,et al.  Dynamic dispatch in object-oriented languages , 1994 .

[35]  David A. Patterson,et al.  Computer Architecture: A Quantitative Approach , 1969 .

[36]  William Pugh,et al.  Two-directional record layout for multiple inheritance , 1990, PLDI '90.

[37]  Jean-Claude Royer,et al.  Optimizing method search with lookup caches and incremental coloring , 1992, OOPSLA '92.

[38]  Andrew A. Chien,et al.  Precise Concrete Type Inference for Object-Oriented Languages , 1994, OOPSLA.

[39]  Andrew A. Chien,et al.  Precise concrete type inference for object-oriented languages , 1994, OOPSLA 1994.

[40]  R. Nigel Horspool,et al.  Compact Dispatch Tables for Dynamically Typed Object Oriented Languages , 1996, CC.