Abstract
Method look-up for dynamically typed object-oriented languages, such as smalltalk-80 or objective-c, is usually implemented by a cached inheritance search. Unfortunately, this technique is slow. A selector-indexed dispatch table implementation speeds up messages to within 10% of the speed of a statically typed language such as C++. We present a fast technique for generating compact selector-indexed dispatch tables.
Preview
Unable to display preview. Download preview PDF.
References
Agessen, O., Palsberg, J., Schwartzbach, M.: Type Inference of SELF: Analysis of Objects with Dynamic and Multiple Inheritance. Proc. ECOOP'93, Seventh European Conference on Object-Oriented Programming, Springer-Verlag, 1993, pp. 247–267.
André, P., Royer, J.-C: Optimizing Method Search with Lookup Caches and Incremental Coloring. Proc. OOPSLA'92, Vancouver, BC, Canada, 1992, pp. 110–126.
Ballard, S., Shirron, S.: The Design and Implementation of VAX/Smalltalk-80. In [14].
Chambers, C., Ungar, D., Lee, E.: An Efficient Implementation of SELF, a Dynamically Typed Object Oriented Programming Language. Proc. OOPSLA'89, New Orleans, LA, 1989, pp. 211–214.
Conroy, T., Pelegri-Llopart, E.: An Assessment of Method-Lookup Caches for Smalltalk-80 Implementations. In [14].
Cox, B.: Object-Oriented Programming: An Evolutionary Approach. Addison-Wesley, Reading, MA, 1987.
Dencker, P., Dürre, K., Heuft, I: Optimization of Parser Tables for Portable Compilers. ACM TOPLAS, 6, 4 (1984) 546–572.
Deutsch, L.P., Schiffman, A.: Efficient Implementation of the Smalltalk-80 System, Proc. 11th Symp.on Principles of Programming Languages, Salt Lake City, UT, 1984, pp. 297–301.
Dixon, R., McKee, T., Schweitzer, P., Vaughan, M.: A Fast Method Dispatcher for Compiled Languages with Multiple Inheritance. Proc. OOPSLA'89s, New Orleans, LA, Oct. 1989. Published as SIGPLAN Notices 24, 10, (1989) 211–214.
Driesen, K.: Selector Table Indexing & Sparse Arrays.Proc. OOPSLA'93, Washington, DC, 1993, pp. 259–170.
Driesen, K.: Method Lookup Strategies in Dynamically Typed Object-Oriented Programming Languages, Masters Thesis. Vrije Universiteit Brussel, 1993.
Dussud, P.: TICLOS: An implementation of CLOS for the Explorer Family. Proc. OOPSLA'89, New Orleans, LA, 1989, pp. 215–219.
Ellis, M.A., Stroustrup, B.: The Annotated C++ Reference Manual. Addison-Wesley, Reading, MA, 1990.
Goldberg, A., Robson, D.: Smalltalk-80: The Language and its Implementation, second edition, Addison-Wesley, Reading, MA, 1985.
Hoelzle, U., Chamber, C., Ungar, D.: Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches. Proc. ECOOP'93, Seventh European Conf. on Object-Oriented Programming, Springer-Verlag, 1993, pp. 21–38.
Huang, S.-K., Chen, D.-J.: Efficient algorithms for method dispatch in object-oriented programming systems, Journal of Object Oriented Programming, Sept. 1992, pp. 43–54.
Kiczales, G., Rodriguez, L.: Efficient Method Dispatch in PCL. Proc. ACM Conf. on Lisp and Functional Programming, 1990, pp. 99–105.
Krasner, G.: Smalltalk-80 Bits of History, Words of Advice. Addison-Wesley, Reading, MA, 1983.
Koenig, A.: How Virtual Functions Work. Journal of Object Oriented Programming, January/February 1989, pp. 73–74.
Meyer, B.: Object-Oriented Software Construction, Prentice Hall, 1989.
NeXT, Concepts: Objective-C, Release 3.1, NeXT Computer, Inc. 1993.
Pugh, W., Weddell, G.: Two-directional record layout for multiple inheritance, Proc. of ACM SIGPLAN'90 Conf. on Programming Languages Design and Implementation, White Plains, NY, June 1990, pp. 85–91.
Rose, J.: Fast Dispatch Mechanisms for Stock Hardware. OOPSLA'88 Conference Proceedings, San Diego, CA, Nov. 1988. Published as SIGPLAN Notices 23, 11 (1988) 27–35.
Thomas, D.: The Time/Space Requirements of Object-Oriented Programs, Journal of Object-Oriented Programming, March/April 1989, pp. 71–73.
Ungar, D., Patterson, D.: Berkeley Smalltalk: Who Knows Where the Time Goes? In [14].
Ungar, D., Smith, R.: SELF: The Power of Simplicity, Lisp And Symbolic Computation: An International Journal 4, 3 (1991).
Vitek, J, Horspool, R.N., Uhl, J.: Compile-time analysis of object-oriented programs, Proc. CC'92,4th Int. Conf. on Compiler Construction, Paderborn, Germany, Springer-Verlag, 1992., pp. 236–250
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Vitek, J., Horspool, R.N. (1994). Taming message passing: Efficient method look-up for dynamically typed languages. In: Tokoro, M., Pareschi, R. (eds) Object-Oriented Programming. ECOOP 1994. Lecture Notes in Computer Science, vol 821. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0052195
Download citation
DOI: https://doi.org/10.1007/BFb0052195
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58202-1
Online ISBN: 978-3-540-48567-4
eBook Packages: Springer Book Archive