Reconciling responsiveness with performance in pure object-oriented languages

Dynamically dispatched calls often limit the performance of object-oriented programs, since opject-oriented programming encourages factoring code into small, reusable units, thereby increasing the frequency of these expensive operations. Frequent calls not only slow down execution with the dispatch overhead per se, but more importantly they hinder optimization by limiting the range and effectiveness of standard global optimizations. In particular, dynamically dispatched calles prevent standard interprocedual optimizations that depend on the availability of a static call graph. The SELF implementation described here offers tow novel approaches to optimization. Type feedback speculatively inlines dynamically dispatched calls based on profile information that predicts likely receiver classes. Adaptive optimization reconciles optimizing compilation with interactive performance by incrementally optimizing only the frequently executed parts of a program. When combined, these two techniques result in a system that can execute programs significantly faster than previous systems while retaining much of the interactiveness of an interpreted system.

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

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

[3]  Tom Moher,et al.  Design of the opportunistic garbage collector , 1989, OOPSLA 1989.

[4]  Urs Hölzle,et al.  Dynamic versus Static Optimization Techniques for Object-Oriented Languages , 1995, Theory Pract. Object Syst..

[5]  Jens Palsberg,et al.  Type inference of SELF: Analysis of objects with dynamic and multiple inheritance , 1995, Softw. Pract. Exp..

[6]  Leonidas J. Guibas,et al.  Compilation and delayed evaluation in APL , 1978, POPL.

[7]  Jack W. Davidson,et al.  A study of a C function inliner , 1988, Softw. Pract. Exp..

[8]  Wen-mei W. Hwu,et al.  Inline function expansion for compiling C programs , 1989, PLDI '89.

[9]  Paul R. Wilson,et al.  Design of the opportunistic garbage collector , 1989, OOPSLA '89.

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

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

[12]  Barbara G. Ryder,et al.  Static Type Determination for C ++3 , 1994 .

[13]  Ronald L. Johnston The Dynamic Incremental Compiler of APL\3000 , 1979, APL '79.

[14]  Mark Baldwin Reinhold CACHE PERFORMANCE OF GARBAGE-COLLECTED PROGRAMMING LANGUAGES , 1993 .

[15]  Keith D. Cooper,et al.  An experiment with inline substitution , 1991, Softw. Pract. Exp..

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

[17]  Susan L. Graham,et al.  An execution profiler for modular programs , 1983, Softw. Pract. Exp..

[18]  James G. Mitchell The Design and Construction of Flexible and Efficient Interactive Programming Systems , 1970, Outstanding Dissertations in the Computer Sciences.

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

[20]  David Grove,et al.  Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis , 1995, ECOOP.

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

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

[23]  Gilbert Joseph Hansen,et al.  Adaptive systems for the dynamic run-time optimization of programs. , 1974 .

[24]  Barbara G. Ryder,et al.  Static Type Determination for C++ , 1994, C++ Conference.

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

[26]  Mary Hall Managing interprocedural optimization , 1992 .

[27]  Peter Lee,et al.  Cache behavior of combinator graph reduction , 1992, TOPL.

[28]  David Keppel,et al.  Shade: a fast instruction-set simulator for execution profiling , 1994, SIGMETRICS.

[29]  Bay-Wei Chang,et al.  Animation: from cartoons to the user interface , 1993, UIST '93.

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

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

[32]  Craig Chambers,et al.  Towards better inlining decisions using inlining trials , 1994, LFP '94.

[33]  Urs Hölzle,et al.  Eliminating Virtual Function Calls in C++ Programs , 1996, ECOOP.

[34]  Amer Diwan,et al.  Memory system performance of programs with intensive heap allocation , 1995, TOCS.

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

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

[37]  David W. Wall,et al.  A practical system fljr intermodule code optimization at link-time , 1993 .

[38]  Bjørn N. Freeman-Benson,et al.  Multi‐way versus one‐way constraints in user interfaces: Experience with the deltablue algorithm , 1993, Softw. Pract. Exp..

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

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

[41]  Craig Chambers,et al.  The design and implementation of the self compiler, an optimizing compiler for object-oriented programming languages , 1992 .

[42]  Craig Chambers,et al.  Debugging optimized code with dynamic deoptimization , 1992, PLDI '92.

[43]  Robert Wilensky,et al.  UCB , 1989, HLT.

[44]  Urs Hölzle,et al.  Dynamic vs . Static Optimization Techniques for Object-Oriented Languages , 1996 .

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

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

[47]  Alan Jay Smith,et al.  Aspects of cache memory and instruction buffer performance , 1987 .

[48]  David Grove,et al.  Profile-guided receiver class prediction , 1995, OOPSLA.

[49]  Mark D. Hill,et al.  Aspects of Cache Memory and Instruction , 1987 .

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