Advertisement

Optimizing Dynamic Dispatches through Type Invariant Region Analysis

  • Mark Leair
  • Santosh Pande
Conference paper
  • 308 Downloads
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2913)

Abstract

Object oriented languages lead to dynamic dispatches of most method calls due to limitations on static analysis which have significant run-time overheads. In this work, we propose a new optimization to cut this overhead which is based on the following key observation: run-time type testing of a method at every call-site is extraneous. The technique makes use of an important observation: most of the times a polymorphic object, although statically unknown in type, is fixed at run-time and never mutates. In such cases, run-time type testing for its methods is only needed when an object is instantiated. The type check is hoisted at the entry point of a region and its results are shared over all dispatches that lie within the region. We implemented this optimization in Vortex, an optimizing object-oriented compiler back-end, and with our framework, we observed an average speed-up of 9.22%. We avoided 91% of the dynamic dispatches with a speed-up of 17.9% in the best case.

Keywords

Table Lookup Type Test Region Size Type Check Type Invariant 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Dean, J., DeFouw, G., Grove, D., Litvinov, V., Chambers, C.: Vortex: An Optimizing Compiler for Object-Oriented Languages. In: OOPSLA 1996, 11th Conference on Object-Oriented Programming, Systems, Languages, and Applications, San Jose, CA (October 1996)Google Scholar
  2. 2.
    Grove, D., Dean, J., Garrett, C., Chambers, C.: Profile-Guided Receiver Class Prediction. In: OOPSLA 1995, Austin, TX (October 1995)Google Scholar
  3. 3.
    Hölzle, U., Chambers, C., Ungar, D.: Optimi zing Dynamically-Typed Object-Oriented Languages with Polymorphic Inline Caches. In: America, P. (ed.) ECOOP 1991. LNCS, vol. 512, pp. 21–38. Springer, Heidelberg (1991)CrossRefGoogle Scholar
  4. 4.
    Deutsch, L.P., Schiffman, A.: Efficient Implement ation of the Smalltalk-80 System. In: Proceedings of the 11th. Symposium on the Principles of Programming Languages, Salt Lake City, UT (1984)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Mark Leair
    • 1
  • Santosh Pande
    • 2
  1. 1.STMicroelectronics, Inc. 
  2. 2.Georgia Institute of Technology 

Personalised recommendations