Measurement and Application of Dynamic Receiver Class Distributions

Dynamic binding slows down object-oriented programs. Dynamic dispatch mechanisms which work well where all receiver classes are equally likely are too pessimistic because at most call sites one receiver class predominates. We apply dynamic profile information to determine the dynamic execution frequency distributions of the classes of receivers at call sites. We show that these distributions are heavily skewed towards the most commonly occurring receiver class across several different languages. Moreover, we show that the distributions are stable across program inputs, from one version of a program to another, and even to some extent across programs that share library code. Finally, we demonstrate that significant run-time performance improvements for object-oriented programs can be gained by exploiting the information contained in dynamic receiver class distributions in a relatively simple optimizing compiler.

[1]  Scott A. Mahlke,et al.  Profile‐guided automatic inline expansion for C programs , 1992, Softw. Pract. Exp..

[2]  Ralph E. Johnson,et al.  Surveying current research in object-oriented design , 1990, CACM.

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

[4]  Craig Chambers,et al.  The cecil language: specification and rationale , 1993 .

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

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

[7]  David Grove,et al.  Identifying Profitable Specialization in Object-Oriented Languages , 1994, PEPM.

[8]  David W. Wall,et al.  Predicting program behavior using real or estimated profiles , 2004, SIGP.

[9]  Randall B. Smith,et al.  SELF: The power of simplicity , 1987, OOPSLA '87.

[10]  John R. Rose,et al.  Fast dispatch mechanisms for stock hardware , 1988, OOPSLA '88.

[11]  Craig Chambers,et al.  Object-Oriented Multi-Methods in Cecil , 1992, ECOOP.

[12]  Craig Chambers,et al.  Making pure object-oriented languages practical , 1991, OOPSLA '91.

[13]  Brian W. Kernighan,et al.  The C Programming Language, Second Edition , 1988 .

[14]  Scott A. Mahlke,et al.  Using profile information to assist classic code optimizations , 1991, Softw. Pract. Exp..

[15]  Randall B. Smith,et al.  Self: The power of simplicity , 1987, OOPSLA 1987.

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

[17]  Susan L. Graham,et al.  Gprof: A call graph execution profiler , 1982, SIGPLAN '82.

[18]  Jack Trout,et al.  The Power Of Simplicity , 1998 .

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

[20]  Bjarne Stroustrup,et al.  The C++ Programming Language, Second Edition , 1991 .

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

[22]  James R. Larus,et al.  Optimally profiling and tracing programs , 1992, POPL '92.