ACM Home Page
Please provide us with feedback. Feedback
Efficient message dispatch in object-oriented systems
Full text PdfPdf (906 KB)
Source ACM SIGPLAN Notices archive
Volume 35 ,  Issue 3  (March 2000) table of contents
Pages: 49 - 58  
Year of Publication: 2000
ISSN:0362-1340
Authors
Mayur Naik  Department of Computer Science and Information Systems, Birla Institute of Technology and Science, Pilani 333031, India
Rajeev Kumar  Department of Computer Science and Information Systems, Birla Institute of Technology and Science, Pilani 333031, India
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 4,   Downloads (12 Months): 45,   Citation Count: 5
Additional Information:

abstract   cited by   index terms   collaborative colleagues  

Tools and Actions: Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/351159.351174
What is a DOI?

ABSTRACT

Single dispatch involves performing at run-time a multi-way switch over the possible classes of the receiver. Most object-oriented systems implement this switch as an array lookup using a table-based technique or as a binary search using a tree-based technique. However, each of these is the best choice only under a particular circumstance; neither outperforms the other under all circumstances. In this paper, we present a time and space efficient implementation of the switch that employs the table-based technique when an array lookup outperforms a binary search and the tree-based technique when a binary search outperforms an array lookup. Further, when neither an array lookup nor a binary search is superior, our scheme blends the two techniques in a manner that gains the benefits of both without suffering the disadvantages of either. We relate our scheme to recent work and discuss extending it to implement multiple dispatch.



Collaborative Colleagues:
Mayur Naik: colleagues
Rajeev Kumar: colleagues