Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Iterative type analysis and extended message splitting; optimizing dynamically-typed object-oriented programs

Published: 01 June 1990 Publication History
  • Get Citation Alerts
  • Abstract

    Object-oriented languages have suffered from poor performance caused by frequent and slow dynamically-bound procedure calls. The best way to speed up a procedure call is to compile it out, but dynamic binding of object-oriented procedure calls without static receiver type information precludes inlining. Iterative type analysis and extended message splitting are new compilation techniques that extract much of the necessary type information and make it possible to hoist run-time type tests out of loops.
    Our system compiles code on-the-fly that is customized to the actual data types used by a running program. The compiler constructs a control flow graph annotated with type information by simultaneously performing type analysis and inlining. Extended message splitting preserves type information that would otherwise be lost by a control-flow merge by duplicating all the code between the merge and the place that uses the information. Iterative type analysis computes the types of variables used in a loop by repeatedly recompiling the loop until the computed types reach a fix-point. Together these two techniques enable our SELF compiler to split off a copy of an entire loop, optimized for the common-case types.
    By the time our SELF compiler generates code for the graph, it has eliminated many dynamically-dispatched procedure calls and type tests. The resulting machine code is twice as fast as that generated by the previous SELF compiler, four times faster than ParcPlace Systems Smalltalk-80,* the fastest commercially available dynamically-typed object-oriented language implementation, and nearly half the speed of optimized C. Iterative type analysis and extended message splitting have cut the performance penalty for dynamically-typed object-oriented languages in half.

    References

    [1]
    Afxed V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, MA, 1986.
    [2]
    Craig Chambers and David Ungar. Customization: Optimizing Compiler Technology for SELF, a Dynamically- Typed Object-Oriented Programming Language. In Proceedings of the SIGPLAN '89 Conference on Programming Language Design and Implementation, Portland, OR, June, 1989. Published as SIGPLAN Notices 24(7), July, 1989.
    [3]
    Craig Chambers, David Ungar, and Elg Lee. An Efficient Implementation of SELF, a Dynamically-Typed Object-Oriented Language Based on Prototypes. In OOPSLA '89 Conference Proceedings, pp. 49-70, New Orleans, LA, 1989. Published as SlGPLAN Notices 24(10), October, 1989.
    [4]
    L. Peter Deutsch and Allan M. Schiffman. F. fficient Implementation of the SmaUtalk-80 System. In Proceedings of the l th Annual ACM Symposium on the Principles of Programming Languages, pp. 297-302, Salt Lake City, LIT, 1984.
    [5]
    Adele Goldberg and David Robson. Smalltalk-80: The Language and Its Implementation. Addison-Wesley, Reading, MA, 1983.
    [6]
    Justin Owen Graver. Type-Checldng and Type-Inference for Object-Oriented Programming Languages. Ph.D. thesis, University of Illinois at Urbana-Champaign, 1989.
    [7]
    Justin O. Graver and Ralph E. Johnson. A Type System for Smalltalk. In Conference Record of the 17th Annual ACM Symposium on Principles of Programming Languages, pp. 136-150, San Francisco, CA, January, 1990.
    [8]
    Richards Louis Heintz, Jr. Low Level Optimizations for an Object-Oriented Programming Language. Master's thesis, University of Illinois at Urbana-champign, 1990.
    [9]
    John Hennessy. Stanford integer b=nehmarks. Personal communication, June, 1988.
    [10]
    Ralph E. Johnson. Type-Checking Smalltalk. In OOPS- LA '86 Conference Proceedings, pp. 315-321, Portland, OR, 1986. Published as SIGPLAN Notices 21(11), November, 1986.
    [11]
    Ralph F. Johnson, Justin O. Graver, and Lawrence W. Zurawski. 'IS: An Optimizia8 Compiler for Smalltalk. In OOPSLA '88 Conference Proceedings, pp. 18-26, San Diego, CA, 1988. Published as SIGPLAN Notices 23(11), November, 1988.
    [12]
    Elgin Lee. Object Storage and Inheritance for SELF, a Prototype-Based Object-Oriented Programming Language. F. ugineer's thesis, Stanford University, 1988.
    [13]
    Carl D. McConnelL The Design of the RTL System. Master's thesis, University of illinois at Urbana-Champaign, 1989.
    [14]
    John Mitchell Personal communication, November, 1989.
    [15]
    Robin Milner, Mads Torte, and Robert Harper. The Definition of Standard ML. M1T Press, Cambridge, MA, 1990.
    [16]
    Atsushi Ohori and Peter Buneman. Static Type Inference for Parametric Classes. In OOPSLA '89 Conference Proceedings, pp. 445-456, New Orleans, LA, 1989. Published as SIGPLAN Notices 24(10), October, 1989.
    [17]
    David A. Padua and Michael J. Wolfe. Advancexi Compilex Opgmizations for Supercomputers. In Communications of the ACM, pp. 1184-1201, December, 1986.
    [18]
    Jonathan Rees and William Clinger, editors. Revised Report on the Algorithmic Language Scheme. 1986.
    [19]
    Peter Sestoft and Harald Scndergaard. A Bibliography on Partial Evaluation. In SlGPLANNotices 23(2), Pp. 19- 27, February, 1988.
    [20]
    David Ungar. The Design and Evaluation of a High Per. formance Smalltalk System. MIT Press, Cambridge, MA, 1987.
    [21]
    David Ungar. A Performance Comparison of C, SELF, and Smalltalk Implementations. Unpublished manuscript, March, 1989.
    [22]
    David Ungar and Randall B. Smith. SELF: The Power of Simplicity. In OOPSLA '87 Conference Proceedings, pp. 227-241, Orlando, FL, 1987. Published as SIGPLAN Notices 22(12), December, 1987.
    [23]
    M. Wand. Complete Type Inference for Simple Objects. In Proceedings of the 2nd IEEE Symposium on Logic in Computer Science, pp. 37-44, 1987.
    [24]
    M. Wand. Type Inference for Record Concatenation and Multiple Inheritance. In Proceedings of the 4th IEEE Symposium on Logic in Computer Science, pp. 92-97, 1989.

    Cited By

    View all
    • (2020)Smart selection of optimizations in dynamic compilersConcurrency and Computation: Practice and Experience10.1002/cpe.608933:18Online publication date: 26-Nov-2020
    • (2019)MV-NetACM Journal on Emerging Technologies in Computing Systems10.1145/335869615:4(1-25)Online publication date: 3-Oct-2019
    • (2019)Comprehensive Analytic Performance Assessment and K-means based Multicast Routing Algorithm and Architecture for 3D-NoC of Spiking NeuronsACM Journal on Emerging Technologies in Computing Systems10.1145/334096315:4(1-28)Online publication date: 3-Oct-2019
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 25, Issue 6
    Jun. 1990
    343 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/93548
    Issue’s Table of Contents
    • cover image ACM Conferences
      PLDI '90: Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation
      June 1990
      351 pages
      ISBN:0897913647
      DOI:10.1145/93542
    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: 01 June 1990
    Published in SIGPLAN Volume 25, Issue 6

    Check for updates

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)57
    • Downloads (Last 6 weeks)10

    Other Metrics

    Citations

    Cited By

    View all
    • (2020)Smart selection of optimizations in dynamic compilersConcurrency and Computation: Practice and Experience10.1002/cpe.608933:18Online publication date: 26-Nov-2020
    • (2019)MV-NetACM Journal on Emerging Technologies in Computing Systems10.1145/335869615:4(1-25)Online publication date: 3-Oct-2019
    • (2019)Comprehensive Analytic Performance Assessment and K-means based Multicast Routing Algorithm and Architecture for 3D-NoC of Spiking NeuronsACM Journal on Emerging Technologies in Computing Systems10.1145/334096315:4(1-28)Online publication date: 3-Oct-2019
    • (2012)A unified tabular method for modeling variants of software product lineACM SIGSOFT Software Engineering Notes10.1145/2180921.218094137:3(1-7)Online publication date: 16-May-2012
    • (2012)Precise static analysis for generic programs in object oriented languagesACM SIGSOFT Software Engineering Notes10.1145/2180921.218093737:3(1-6)Online publication date: 16-May-2012
    • (2012)Semantics for UML model transformation and generation of regular grammarACM SIGSOFT Software Engineering Notes10.1145/2180921.218093137:3(1-5)Online publication date: 16-May-2012
    • (2012)Issues arising from refactoring studiesACM SIGSOFT Software Engineering Notes10.1145/2180921.218092237:3(1-5)Online publication date: 16-May-2012
    • (2006)Eliminating virtual function calls in C++ programsECOOP ’96 — Object-Oriented Programming10.1007/BFb0053060(142-166)Online publication date: 21-May-2006
    • (2005)A Survey of Adaptive Optimization in Virtual MachinesProceedings of the IEEE10.1109/JPROC.2004.84030593:2(449-466)Online publication date: Feb-2005
    • (2005)Type directed cloning for Object-Oriented programsLanguages and Compilers for Parallel Computing10.1007/BFb0014224(566-580)Online publication date: 9-Jun-2005
    • Show More Cited By

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media