article

Type feedback vs. concrete type inference: a comparison of optimization techniques for object-oriented languages

Abstract

Two promising optimization techniques for object-oriented languages are type feedback (profile-based receiver class prediction) and concrete type inference (static analysis). We directly compare the two techniques, evaluating their effectiveness on a suite of 23 SELF programs while keeping other factors constant.Our results show that both systems inline over 95% of all sends and deliver similar overall performance with one exception: SELF's automatic coercion of machine integers to arbitrary-precision integers upon overflow confounds type inference and slows down arithmetic-intensive benchmarks.We discuss several other issues which, given the comparable run-time performance, may influence the choice between type feedback and type inference.

References

  1. Age94 Ole Agesen. Constraint-Based Type Inference and Parametric Polymorphism. in SAS '94, First International Static Analysis Symposium, p. 78-100, Namur, Belgium, Sept. 1994. Springer-Verlag (LNCS 864).Google ScholarGoogle Scholar
  2. AU94 Ole Agesen and David Ungar. Sifting Out the Gold: Delivering Compact Applications from an Object-Oriented Exploratory Programming Environment. In OOPSLA "94, Object-Oriented Programming Systems, Languages and Applications, p. 355-370, Portland, OR, Oct. 1994. Google ScholarGoogle Scholar
  3. Age95 Ole Agesen. The Cartesian Product Algorithm: Simple and Precise Type Inference of Parametric Polymorphism. In ECOOP '95, Ninth European Conference on Object- Oriented Programming, Arhus, Denmark, Aug. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. AH95 Ole Agesen and Urs H61zle. Type Feedback vs. Concrete Type Inference: A Comparison of Optimization Techniques for Object-Oriented Languages. Technical Report TRCS95- 04, University of California, Santa Barbara, March 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. APS93 Ole Agesen, Jens Palsberg, and Michael I. Schwartzbach. Type Inference of SELF: Analysis of Objects with Dynamic and Multiple Inheritance. In ECOOP '93, Seventh Euror,)ean Conference on Object-Oriented Programming, p. 247-267, Kaiserslautern, Germany, July 1993. Springer- Verlag (LNCS 707). Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. CGZ94 Brad Calder, Dirk Grunwald, and Benjamin Zorn. Quantifying Behavioral Differences Between C and C++ Programs. Journal of Programming Languages 4(2), Dec. 1994.Google ScholarGoogle Scholar
  7. CUL89 Craig Chambers, David Ungar, and Elgin Lee. An Efficient Implementation of SELF, a Dynamically-Typed Object- Oriented Language Based on Prototypes. In OOPSLA '89, Object-Oriented Programming Systems, Languages and Applications, p. 49-70, New Orleans, LA, Oct. 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. CU90 Craig Chambers and David Ungar. Iterative Type Analysis and Extended Message Splitting: Optimizing Dynamically- Typed Object-Oriented Programs. In Proceedings of the SIGPLAN '90 Conference on Programming Language Design and Implementation, p. 150-164, White Plains, NY, June 1990. Google ScholarGoogle Scholar
  9. DGC95 Jeffrey Dean, David Grove, and Craig Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In ECOOP '95, Ninth European Conference on Object-Oriented Programming, Arhus, Denmark, Aug. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. DS84 L. Peter Deutsch and Alan Schiffman. Efficient Implementation of the Smalltalk-80 System. Proceedings of the 11th Symposium on the Principles of Programming Languages, p. 297-302, Salt Lake City, UT, Jan. 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Dyk77 Eric J. Van Dyke. A dynamic incremental compiler for an interpretative language. HP Journal, p. 17-24, July 1977.Google ScholarGoogle Scholar
  12. Gro95 David Grove, Jeffrey Dean, Charles D. Garrett, and Craig Chambers. Profile-Guided Receiver Class Prediction. In OOPSLA '95, Object-Oriented Programming Systems, Languages and Applications, Austin, TX, Oct. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. GW78 Leo J. Guibas and Douglas K. Wyatt. Compilation and Delayed Evaluation in APL. In Fifth Annual ACM Symposium on Principles of Programming Languages, p. 1- 8, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. HCU91 Urs Htilzle, Craig Chambers, and David Ungar. Optimizing Dynamically-Typed Object-Oriented Languages with Polymorphic Inline Caches. In ECOOP '91, Fifth European Conference on Object-Oriented Programming, p. 21-38, Geneva, July 1991. Springer-Verlag (LNCS 512). Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Höl94 Urs H61zle. Adaptive Optimization in SELF: Reconciling High Performance with Exploratory Programming. Ph.D. Thesis, Department of Computer Science, Stanford University, Aug. 1994. (Available from http://www.cs.ucsb.edu/--urs.)Google ScholarGoogle Scholar
  16. HU94a Urs H61zle and David Ungar. Optimizing Dynamically- Dispatched Calls with Run-Time Type Feedback. In Proceedings of the SIGPLAN '94 Conference on Programming Language Design and Implementation, p. 326-336, Orlando, FL, June 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. HU94b Urs H61zle and David Ungar. A Third-Generation SELF Implementation: Reconciling Responsiveness with Performance. OOPSLA '94, Object-Oriented Programming Systems, Languages and Applications, p. 229-243, Portland, OR, Oct. 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. JGZ88 Ralph Johnson, Justin Graver, and Lawrence Zurawski. TS: An optimizing compiler for Smalltalk. In OOPSLA '88, Object-Oriented Programming Systems, Languages and Applications, p. 18-26, San Diego, CA, Sept. 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Joh79 Ronald L. Johnston. The Dynamic Incremental Compiler of APL\3000. In Proceedings of the APL '79 Conference. Published as APL Quote Quad 9(4), p. 82-87, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Kra83 Glenn Krasner, ed., Smalltalk-80: Bits of History and Words of Advice. Addison-Wesley, Reading, MA, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Mit70 J. G. Mitchell, Design and Construction of Flexible and Efficient Interactive Programming Systems. Ph.D. Thesis, Carnegie-Mellon University, 1970. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. OPS92 Nicholas Oxh~j, Jens Palsberg and Michael I. Schwartzbach. Making Type Inference Practical. In ECOOP '92, Sixth European Conferenceon Object- Oriented Programming, p. 329-349, Utrecht, The Netherlands, June 1992. Springer-Verlag (LNCS 615). Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. PS91 Jens Palsberg and Michael I. Schwartzbach. Object- Oriented Type Inference. In OOPSLA "91, Conference on Object-Oriented Programming Systems, Languages and Applications, p. 146-161, Phoenix, AZ, Oct. 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. PR94 Hemant D. Pande and Barbara G. Ryder. Static Type Determination and Aliasing for C++. Technical Report LCSR- TR-236, Rutgers University, Dec. 1994.Google ScholarGoogle Scholar
  25. PC94a John B. Plevyak and Andrew A. Chien. Precise Concrete Type Inference for Object-Oriented Languages. In OOPSLA '94, Object-Oriented Programming Systems, Languages and Applications, p. 324-340, Portland, OR, Oct. 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. PC94b John B. Plevyak and Andrew A. Chien. Precise Concrete Type Inference and its Use in Program Optimization. Unpublished report, Oct. 1994.Google ScholarGoogle Scholar
  27. PC94c john B. Plevyak and Andrew A. Chien. Efficient cloning to eliminate dynamic dispatch in object-oriented languages. Unpublished report, Dec. 1994.Google ScholarGoogle Scholar
  28. PZC95 John B. Plevyak, Xingbin Zhang, and Andrew A. Chien. Obtaining sequential efficiency for concurrent objectoriented languages. In Proceedings of the 22nd Symposium on Principles of Programming Languages, p. 311-32 l, San Francisco, CA, Jan. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Suz81 Norihisa Suzuki. Inferring Types in Smalltalk. In Conference Record of the Eighth Annual A CM Symposium on Principles of Programming Languages, p. 227-241, Jan. 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. US87 David Ungar and Randall B. Smith. SELF: The Power of Simplicity. In OOPSLA '87, Object-Oriented Programming Systems, Languages and Applications, p. 227-241, Orlando, FL, Oct. 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. VHU92 Jan Vitek, R. Nigel Horspool and James S. Uhl. Compiletime Analysis of Object-Oriented Programs. In Proceedings of CC'92, 4th International Conference on Compiler Springer-Verlag (LNCS 641). Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Type feedback vs. concrete type inference: a comparison of optimization techniques for object-oriented languages

          Comments

          Login options

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

          Sign in

          Full Access

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!