|
ABSTRACT
The speed of message dispatching is an important issue in the overall performance of object-oriented programs. We have developed an algorithm for constructing efficient dispatch functions that combines novel algorithms for efficient single dispatching, multiple dispatching, and predicate dispatching. Our algorithm first reduces methods written in the general predicate dispatching model (which generalizes single dispatching, multiple dispatching, predicate classes and classifiers, and pattern-matching) into ones written using a simpler multimethod dispatching model. Our algorithm then computes a strategy for implementing multiple dispatching in terms of sequences of single dispatches, representing the strategy as a lookup DAG. Finally, our algorithm computes an implementation strategy separately for each of the single dispatches, producing for each dispatch a dispatch tree, which is a binary decision tree blending class identity tests, class range tests, and table lookups. Our algorithm exploits any available static information (from type declarations or class analysis) to prune unreachable paths from the lookup DAG, and uses any available dynamic profile information to minimize the expected time to search the dispatch trees. We measure the effectiveness of our dispatching algorithms on a collection of large Cecil programs, compiled by the Vortex optimizing compiler, showing improvements of up to 30% over already heavily optimized baseline versions.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
Agesen 95
|
|
 |
Amiel et. al. 94
|
Eric Amiel , Olivier Gruber , Eric Simon, Optimizing multi-method dispatch using compressed dispatch tables, Proceedings of the ninth annual conference on Object-oriented programming systems, language, and applications, p.244-258, October 23-28, 1994, Portland, Oregon, United States
|
 |
Bobrow et. al. 88
|
Daniel G. Bobrow , Linda G. DeMichiel , Richard P. Gabriel , Sonya E. Keene , Gregor Kiczales , David A. Moon, Common Lisp Object System specification, ACM SIGPLAN Notices, v.23 n.SI, p.1-142, September 1988
[doi> 10.1145/885631.885632]
|
 |
Chambers & Ungar 90
|
|
| |
Chambers 92
|
|
| |
Chambers 93a
|
Craig Chambers. The Cecil Language: Specification and Rationale. Technical Report UW-CSE-93-03-05, Department of Computer Science and Engineering. University of Washington, March 1993. Revised, March 1997.
|
| |
Chambers 93b
|
|
| |
Chambers et al. 96
|
Craig Chambers, Jeffrey Dean, and David Grove. Whole-Program Optimization of Object-Oriented Languages. Teelmieal Report UW-CSE-96-06-02, Department of Computer Science and Engineering. University of Washington, June 1996.
|
| |
Chen et al. 94
|
|
| |
Dean et al. 95
|
|
 |
Dean et al. 96
|
Jeffrey Dean , Greg DeFouw , David Grove , Vassily Litvinov , Craig Chambers, Vortex: an optimizing compiler for object-oriented languages, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.83-100, October 06-10, 1996, San Jose, California, United States
|
 |
DeFouw et al. 98
|
Greg DeFouw , David Grove , Craig Chambers, Fast interprocedural class analysis, Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.222-236, January 19-21, 1998, San Diego, California, United States
[doi> 10.1145/268946.268965]
|
 |
Driesen & Hölzle 95
|
Karel Driesen , Urs Hölzle, Minimizing row displacement dispatch tables, Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications, p.141-155, October 15-19, 1995, Austin, Texas, United States
|
 |
Driesen 93
|
Karel Driesen, Selector table indexing & sparse arrays, Proceedings of the eighth annual conference on Object-oriented programming systems, languages, and applications, p.259-270, September 26-October 01, 1993, Washington, D.C., United States
|
| |
Driesen et al. 95
|
|
| |
Dujardin 96
|
Eric Dujardin. Efficient Dispatch of Multimehtods in Constant Time with Dispatch Trees. Technical Report 2892, INRIA, Rocquencourt, France, 1996.
|
 |
Dujardin et al. 98
|
|
 |
Dussud 89
|
|
| |
Ernst et al. 98
|
|
 |
Fernandez 95
|
|
| |
Goldberg & Robson 83
|
|
| |
Gosling et al. 96
|
|
 |
Grove et al. 95
|
David Grove , Jeffrey Dean , Charles Garrett , Craig Chambers, Profile-guided receiver class prediction, Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications, p.108-123, October 15-19, 1995, Austin, Texas, United States
|
 |
Grove et al. 97
|
David Grove , Greg DeFouw , Jeffrey Dean , Craig Chambers, Call graph construction in object-oriented languages, Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.108-124, October 05-09, 1997, Atlanta, Georgia, United States
|
| |
Hamer et al. 90
|
J. Hamer, J.G. Hosking, and W.B. Mugridge. A Method for Integrating Classification Within an Object-Oriented Environment. Technical Report Auckland Computer Science Report No. 48, Department of Computer Science, University of Auckland, October 1990.
|
| |
Hölzle et al. 91
|
|
| |
Hu & Tucker 71
|
T.C. Hu and A. C. Tucker. "Optimal Computer Search Trees and Variable-Length Alphabetical Codes. SIAM Journal on Applied Mathematics, 21 (4):514-532, 1971.
|
 |
Hudak et al. 92
|
Paul Hudak , Simon Peyton Jones , Philip Wadler , Brian Boutel , Jon Fairbairn , Joseph Fasel , María M. Guzmán , Kevin Hammond , John Hughes , Thomas Johnsson , Dick Kieburtz , Rishiyur Nikhil , Will Partain , John Peterson, Report on the programming language Haskell: a non-strict, purely functional language version 1.2, ACM SIGPLAN Notices, v.27 n.5, p.1-164, May 1992
[doi> 10.1145/130697.130699]
|
| |
Hyafil & Rivest 76
|
Laurem Hyafil and RonaldL. Rivest. Constructing optimal binary decision trees is NP-complete. Information Processing Letters, 5( 1): 15-17, May 1976.
|
 |
Johnson 86
|
|
 |
Johnson et al. 88
|
Ralph E. Johnson , Justin O. Graver , Laurance W. Zurawski, TS: an optimizing compiler for smalltalk, Conference proceedings on Object-oriented programming systems, languages and applications, p.18-26, September 25-30, 1988, San Diego, California, United States
|
| |
Kaehler & Krasner 83
|
Ted Kaehler and Glenn Krasner. LOOM Large Object-Oriented Memory for Smalltalk-80 Systems. In G. Krasner, editor, Smalltalk-80 m Bits of History, Words of Advice, chapter 14, pages 251-270. Addison-Wesley, 1983.
|
 |
Kiczales & Rodriguez 90
|
|
| |
Meyer 92
|
|
| |
Milner et al. 97
|
|
 |
Morel & Renvoise 79
|
|
| |
Mugridge et al. 91
|
|
| |
Nakamura et al. 96
|
Hiroaki Nakamura, Tamiya Onodera, and Mildo Takeuehi. Message dispatch using binary decision trees. Technical Report RT0137, IBM Research, Tokyo Research Laboratory, Kanagawa, Japan, March 1, 1996.
|
| |
Nelson 91
|
|
| |
Pang et al. 99
|
|
| |
Peyton Jones 87
|
|
 |
Plevyak & Chien 94
|
John Plevyak , Andrew A. Chien, Precise concrete type inference for object-oriented languages, Proceedings of the ninth annual conference on Object-oriented programming systems, language, and applications, p.324-340, October 23-28, 1994, Portland, Oregon, United States
|
 |
Rose 88
|
|
| |
Shalit 96
|
Andrew Shalit, editor. The Dylan Reference Manual. Addison-Wesley, Reading, MA, 1996.
|
| |
Steele Jr. 90
|
|
| |
Stroustrup 91
|
|
| |
Taivalsaari 93
|
Antero Taivalsaari. Object-oriented programming with modes. Journal of Object-Oriented Programming, pages 25--32, June 1993.
|
 |
Vitek et al. 97
|
Jan Vitek , R. Nigel Horspool , Andreas Krall, Efficient type inclusion tests, Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.142-157, October 05-09, 1997, Atlanta, Georgia, United States
|
 |
Zendra et al. 97
|
Olivier Zendra , Dominique Colnet , Suzanne Collin, Efficient dynamic dispatch without virtual function tables: the SmallEiffel compiler, Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.125-141, October 05-09, 1997, Atlanta, Georgia, United States
|
CITED BY 21
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Shay Artzi , Michael D. Ernst, Using predicate fields in a highly flexible industrial control system, Companion to the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 16-20, 2005, San Diego, CA, USA
|
|
|
|
|
|
Curtis Clifton , Todd Millstein , Gary T. Leavens , Craig Chambers, MultiJava: Design rationale, compiler implementation, and applications, ACM Transactions on Programming Languages and Systems (TOPLAS), v.28 n.3, p.517-575, May 2006
|
|
|
|
|
|
Christopher Dutchyn , Paul Lu , Duane Szafron , Steven Bromling , Wade Holst, Multi-dispatch in the Java virtual machine: design and implementation, Proceedings of the 6th conference on USENIX Conference on Object-Oriented Technologies and Systems, p.6-6, January 29-February 02, 2001, San Antonia, Texas
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|