skip to main content
10.1145/1059579.1059584acmconferencesArticle/Chapter ViewAbstractPublication PagesivmeConference Proceedingsconference-collections
Article

Code sharing among states for stack-caching interpreter

Published:07 June 2004Publication History

ABSTRACT

Interpretation has salient merits of simplicity, portability and small footprint but comes with a price of poor performance. Stack caching is a technique to build a high-performance interpreter by keeping source and destination operands of instructions in registers so as to reduce memory accesses involved during interpretation. One drawback of stack caching is that an instruction may have multiple ways to perform interpretation depending on which registers source operands reside in, resulting in code explosion as well as deterioration of code maintainability. This paper presents a code sharing mechanism that achieves performance as efficient as the stack-caching interpreter and in the meantime keeps the code size as compact as general threaded interpreters. Our results show that our approach outperforms a threaded interpreter by an average of 13.6% and the code size increases by only 1KB (~3%).

References

  1. Andrew Beatty, Kevin Casey, David Gregg and Andrew Nisbet, An optimized Java interpreter for connected devices and embedded systems, in Proceedings of the 2003 ACM symposium on Applied computing, pp. 692--697, Melbourne, Florida, 2003]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ian Piumarta and Fabio Riccardi. Optimizing direct-threaded code by selective inlining. In SIGPLAN'98 Conference on Programming Language Design and Implementation, pp. 291--300, 1998]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Intel Corporation. Intel XScale Microarchitecture for the PXA255 processor: Use's Manual, March 2003.]]Google ScholarGoogle Scholar
  4. Jan Hoogerbrugge and Lex Augusteijn, pipelined Java Virtual Machine Interpreters. In Proceedings of the 9th International Conference of Compiler Construction, pp 35--49, Springer-Verlag, 2000]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Kazunori Ogata, Hideaki Komatsu and Toshio Nakatani, Bytecode fetch optimization for a Java interpreter, in Proceedings of the 10th international conference on architectural support for programming languages and operating systems (ASPLOS-X), pp. 58--67, San Jose, California, 2002]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Anton Ertl and David Gregg, The structure and performance of efficient interpreters, in Journal of Instruction-Level Parallelism, vol. 5, November 2003.]]Google ScholarGoogle Scholar
  7. M. Anton Ertl and David Gregg. Optimizing Indirect Branch Prediction Accuracy in Virtual Machine Interpreters, In Proceedings of the ACM SIGPLAN 2003 conference on Programming Language Design and Implementation, pp 278--288, San Diego, 2003]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. Anton Ertl, David Gregg, Andreas Krall and Bernd Paysan, Vmgen - a generator of efficient virtual machine interpreters, in Software Practice and Experience, vol. 32(3), pp. 265--294, Wiley Interscience, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Anton Ertl, Stack caching for Interpreters, In Proceedings of the ACM SIGPLAN 1995 Conference on Programming Language Design and Implementation, pages 315--327, La Jolla, California, 1995]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Anton Ertl. Implementation of Stack-Based Languages on Register Machines. Dissertation, Technische Universitat Wien, Austria, 1996]]Google ScholarGoogle Scholar
  11. Lindholm, T. and Yellin, F., The Java Virtual Machine Specification. Addison Wesley, Reading, MA, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Todd A. Proebstring, Optimizing an ANSI C Interpreter with Superoperators. In Proceedings of 15th Annual ACM Symposium on Principles of Programming Languages, pp. 322--332, 1995]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Robert Griesemer, Interpreter Generation and Implementation Utilizing Interpreter States and Register Caching, US Patent 6,192,516 B1, Feb. 20, 2001. Filed April 27, 1999. http://www.uspto.gov/]]Google ScholarGoogle Scholar
  14. Lars Bak, Robert Griesemer, Interpreting Functions Utilizing A Hybrid of Virtual and Native Machine Instructions", US Patent 6,513,156 B2, Jan 28, 2003. Filed June 30, 1997. http://www.uspto.gov/]]Google ScholarGoogle Scholar

Index Terms

  1. Code sharing among states for stack-caching interpreter

    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
      IVME '04: Proceedings of the 2004 workshop on Interpreters, virtual machines and emulators
      June 2004
      57 pages
      ISBN:1581139098
      DOI:10.1145/1059579

      Copyright © 2004 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: 7 June 2004

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader