skip to main content
10.1145/207110.207119acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free Access

Selective specialization for object-oriented languages

Authors Info & Claims
Published:01 June 1995Publication History

ABSTRACT

Dynamic dispatching is a major source of run-time overhead in object-oriented languages, due both to the direct cost of method lookup and to the indirect effect of preventing other optimizations. To reduce this overhead, optimizing compilers for object-oriented languages analyze the classes of objects stored in program variables, with the goal of bounding the possible classes of message receivers enough so that the compiler can uniquely determine the target of a message send at compile time and replace the message send with a direct procedure call. Specialization is one important technique for improving the precision of this static class information: by compiling multiple versions of a method, each applicable to a subset of the possible argument classes of the method, more precise static information about the classes of the method's arguments is obtained. Previous specialization strategies have not been selective about where this technique is applied, and therefore tended to significantly increase compile time and code space usage, particularly for large applications. In this paper, we present a more general framework for specialization in object-oriented languages and describe a goal directed specialization algorithm that makes selective decisions to apply specialization to those cases where it provides the highest benefit. Our results show that our algorithm improves the performance of a group of sizeable programs by 65% to 275% while increasing compiled code space requirements by only 4% to 10%. Moreover, when compared to the previous state-of-the-art specialization scheme, our algorithm improves performance by 11% to 67% while simultaneously reducing code space requirements by 65% to 73%.

References

  1. Amiel et al 94.Eric Amlel, Olivier Gruber, and Eric Simon. Optimizing Multi-Method Dispatch Using Compressed Dispatch Tables. in Proceedings OOPSLA '94, pages 244-258, Portland, Oregon, October 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Chambers & Ungar 89.Craig Chambers and David Ungar. Customization: Optimizing Compiler Technology for Self, A Dynamically-Typed Object-Oriented Programming Language. SiGPLAN Notices, 24(7):146-160, July 1989. In Proceedings of the ACM SIGPLAN '89 Conference on Programming Language Design and Implementation.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Chambers & Ungar 91.Craig Chambers and David Ungar. Making Pure Object-Oriented Languages Practical. In Proceedings OOPSLA '91, pages 1-15, November 1991. Published as ACM SIGPLAN Notices, volume 26, number t 1.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Chambers 92.Craig Chambers. The Design and Implementation of the SELF Compiler, an Optimizing Compiler for Object-Oriented Programming Languages. PhD thesis, Stanford University, March 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Chambers 93.Craig Chambers. The Cecil Language: Specification and Rationale. Technical Report TR-93-03-05, Department of Computer Science and Engineering. University of Washington, March 1993.]]Google ScholarGoogle Scholar
  6. Chambers et al 89.Craig Chambers, David Ungar, and Elgin Lee. An Efficient Implementation of SELF- a Dynamically-Typed Object-Oriented Language Based on Prototypes. In Proceedings OOPSLA '89, pages 49-70, October 1989. Published as ACM SIGPLAN Notices, volume 24, number 10.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Chambers et al 95.Craig Chambers, Jeffrey Dean, and David Grove. A Framework for Selective Recompilation in the Presence of Complex Intermodule Dependencies. In I7th International Conference on Software Engineering, Seattle, WA, April 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Chen et al 94.Weimin Chen, Volker Turau, and Wolfgang Klas. Efficient Dynamic Look-up Strategy for Multi-Methods. In M. Tokoro and R. Pareschi, editors, Proceedings ECOOP '94, pages 408--431, Bologna, Italy, July 1994. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Cooper et al 92.Keith D. Cooper, Mary W. Hall, and Ken Kennedy. Procedure Cloning. In Proceedings of 1992 IEEE International Conference on Computer Languages, pages 96- 105, Oakland, CA, April 1992.]]Google ScholarGoogle ScholarCross RefCross Ref
  10. Dean & Chambers 94.Jeffrey Dean and Craig Chambers. Towards Better Inlining Decisions Using Inlining Trials. In Proceedings of the A CM Conference on LISP and Functional Programming '94, pages 273-282, Orlando, FL, June 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Dean et al 95.Jeffrey Dean, David Grove, and Craig Chambers. Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis. In Proceedings ECOOP '95, Aarhus, Denmark, August 1995. Springer-Vertag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Garrett et al 94.Charlie Garrett, Jeffrey Dean, David Grove, and Craig Chambers. Measurement and Application of Dynamic Receiver Class Distributions. Technical Report UW-CS 94-03- 05, University of Washington, March 1994.]]Google ScholarGoogle Scholar
  13. Grove & Torczon 93.Dan Grove and Linda Torczon. Interprocedural Constant Propagation: A Study of Jump Function Implementations. SIGPLAN Notices, 28(6):90-99, June 1993. In Proceedings of the A CM SIGPLAN '93 Conference on Programming Language Design and Implementation.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Holzle & Ungar 94.Urs Holzle and David Ungar. Optimizing Dynamically-Dispatched Calls with Run-Time Type Feedback. SIGPLAN Notices, 29(6):326-336, June 1994. In Proceedings of the ACM SIGPLAN '94 Conference on Programming Language Design and Implementation.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Holzle et al 91.Urs HOlzle, Craig Chambers, and David Ungar. Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches. In P. America, editor, Proceedings ECOOP '91, LNCS 512, pages 21-38, Geneva, Switzerland, July 1991. Sprmger-Vertag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Ingalls 86.Daniel H. H. Ingalls. A Simple Technique for Handling Multiple Polymorphism. In Proceedings OOPSLA '86, pages 347-349, November 1986. Published as ACM SIGPLAN Notices, volume 21, number 11.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Jones et al 93.Neil D. Jones, Carstein K. Gomarde, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall, New York, NY, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Katz & Weise 92.M. Katz and D. Weise. Towards a New Perspective on Partial Evaluation. In Proceedings of the Workshop on Partial Evaluation and Semantics-Based Program Manipulation '92, pages 29-36. Yale University, 1992.]]Google ScholarGoogle Scholar
  19. Kiczales & Rodriguez 89.Gregor Kiczales and Luis Rodriguez. Efficient Method Dispatch in PCL. Technical Report SSL 89-95, Xerox PARC Systems Sciences Laboratory, 1989.]]Google ScholarGoogle Scholar
  20. Kilian 88.Michael F. Kilian. Why Trellis/Owl Runs Fast. Unpublished manuscript, March 1988.]]Google ScholarGoogle Scholar
  21. Lea 90.Doug Lea. Customization in C++. In Proceedings of the 1990 Usenix C++ Conference, San Francisco, CA, Aprfi 1990.]]Google ScholarGoogle Scholar
  22. Lim & Stolcke 91.Chu-Cheow Lim and Andreas Stolcke. Sather Language Design and Performance Evaluation. Technical Report TR 91-034, International Computer Science Institute, May 1991.]]Google ScholarGoogle Scholar
  23. Palsberg & Schwartzbach 91.Jens Palsberg and Michael I. Schwartzbach. Object-Oriented Type Inference. In Proceedings OOPSLA '91, pages 146-t61, November 1991. Published as ACM SIGPLAN Notices, volume 26, number 11.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Pande & Ryder 94.Hemant D. Pande and Barbara G. Ryder. Static Type Determination for C++. in Proceedings of Sixth USENIX C+ + Technical Conference, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Plevyak & Chien 94.John Plevyak and Andrew A. Chien. Precise Concrete Type Inference for Object-Oriented Languages. in Proceedings OOPSLA '94, pages 324-340, Portland, Oregon, October 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Ruf & Weise 91.E. Ruf and D. Weise. Using Types to Avoid Redundant Specialization. In Proceedings of the Symposium on Partial Evaluation and Semantics'Based Program Manipulation '91, pages 32t-333. ACM, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Selective specialization for object-oriented languages

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              PLDI '95: Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
              June 1995
              335 pages
              ISBN:0897916972
              DOI:10.1145/207110

              Copyright © 1995 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 1 June 1995

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • Article

              Acceptance Rates

              PLDI '95 Paper Acceptance Rate28of105submissions,27%Overall Acceptance Rate406of2,067submissions,20%

              Upcoming Conference

              PLDI '24

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader