Skip to main content

Optimizing Dynamic Dispatches through Type Invariant Region Analysis

  • Conference paper
  • 406 Accesses

Part of the book series: Lecture Notes in Computer Science ((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.

This research is partially supported by NSF under grant # CCR 9696129

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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. Grove, D., Dean, J., Garrett, C., Chambers, C.: Profile-Guided Receiver Class Prediction. In: OOPSLA 1995, Austin, TX (October 1995)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Leair, M., Pande, S. (2003). Optimizing Dynamic Dispatches through Type Invariant Region Analysis. In: Pinkston, T.M., Prasanna, V.K. (eds) High Performance Computing - HiPC 2003. HiPC 2003. Lecture Notes in Computer Science, vol 2913. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24596-4_49

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24596-4_49

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20626-2

  • Online ISBN: 978-3-540-24596-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics