skip to main content
article
Free access

Stack caching for interpreters

Published: 01 June 1995 Publication History

Abstract

An interpreter can spend a significant part of its execution time on accessing arguments of virtual machine instructions. This paper explores two methods to reduce this overhead for virtual stack machines by caching top-of-stack values in (real machine) registers. The dynamic method is based on having, for every possible state of the cache, one specialized version of the whole interpreter; the execution of an instruction usually changes the state of the cache and the next instruction is executed in the version corresponding to the new state. In the static method a state machine that keeps track of the cache state is added to the compiler. Common instructions exist in specialized versions for several states, but it is not necessary to have a version of every instruction for every cache state. Stack manipulation instructions are optimized away.

References

[1]
James R. Bell. Threaded code. Communications of the A CM, 16(6):370-372, 1973.
[2]
Russell P. Blake. Exploring a stack architecture, iEEE Computer, 10(5):30-39, May 1977.
[3]
comp. compilers. Usenet Newsgroup; archives available from ftp://primost, cs. wisc.edu.
[4]
David R. Ditzel and H. R. McLellan. Register allocation for free: The C machine stack cache. In Symposium on Architectural Support/or Programming Languages and Systems, pages 48-56, 1982.
[5]
Eddy H. Debaere and Jan M. Van Campenhout. Interpretation and Instruction Path Coprocessing. The MIT Press, 1990.
[6]
Christopher W. Fraser, Robert R. Henry, and Todd A. Proebsting. BURG Fast Optimal Instruction Selection and Tree Parsing, 1991. Available via anonymous ftp from kaese.cs.wisc.edu, file pub/burg, shar. Z.
[7]
John R. Hayes, Martin E. Fraeman, Robert L. Williams, and Thomas Zaremba. An architecture for the direct execution of the Forth programming language. In Architectural Support/or Programming Languages and Operating Systems (ASPLOS- II), pages 42-48, 1987.
[8]
John Hayes and Susan Lee. The architecture of the SC32 Forth engine. Journal o/ Forth Application and Research, 5(4):493- 5O6, 1989.
[9]
John L. Hennessy and David A. Patterson. Computer Architecture. A Quantitative Approach. Morgan Kaufman Publishers, 1990.
[10]
Makoto Hasekawa and Yoshiharu Shigei. High-speed top-of-stack scheme for interpreters: A management algorithm and its analysis. In International Symposium on Computer Archictecture (ISCA), pages 48- 54, 1985.
[11]
Paul Klint. Interpretation techniques. Software--Practice and Experience, 11:963- 973, 1981.
[12]
Philip J. Koopman, Jr. Stack Computers. Ellis Horwood Limited, 1989.
[13]
Glen Krasner, editor. Smalltalk-80: Bits of History, Words o/Advice. Addison-Wesley, 1983.
[14]
Thomas Pittman. Two-level hybrid interpreter/native code execution for combined space-time efficiency. In Symposium on interpreters and Interpretive Techniques (SIGPLAN '87), pages 150-152, 1987.
[15]
Eduardo Pelegrf-Llopart and Susan L. Graham. Optimal code generation for expression trees: An application of the BURS theory. In Fifteenth Annual A CM Symposium on Principles o/Programming Languages, pages 294-308, 1988.

Cited By

View all
  • (2022)Interpreter Register Autolocalisation: Improving the Performance of Efficient InterpretersCompanion Proceedings of the 6th International Conference on the Art, Science, and Engineering of Programming10.1145/3532512.3532518(1-5)Online publication date: 21-Mar-2022
  • (2018)VMOR: Microarchitectural Support for Operand Access in an InterpreterIEEE Computer Architecture Letters10.1109/LCA.2018.286624317:2(217-220)Online publication date: 7-Nov-2018
  • (2012)Distributed application tamper detection via continuous software updatesProceedings of the 28th Annual Computer Security Applications Conference10.1145/2420950.2420997(319-328)Online publication date: 3-Dec-2012
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 30, Issue 6
June 1995
327 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/223428
Issue’s Table of Contents
  • cover image ACM Conferences
    PLDI '95: Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
    June 1995
    335 pages
    ISBN:0897916972
    DOI:10.1145/207110
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 1995
Published in SIGPLAN Volume 30, Issue 6

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)474
  • Downloads (Last 6 weeks)47
Reflects downloads up to 04 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Interpreter Register Autolocalisation: Improving the Performance of Efficient InterpretersCompanion Proceedings of the 6th International Conference on the Art, Science, and Engineering of Programming10.1145/3532512.3532518(1-5)Online publication date: 21-Mar-2022
  • (2018)VMOR: Microarchitectural Support for Operand Access in an InterpreterIEEE Computer Architecture Letters10.1109/LCA.2018.286624317:2(217-220)Online publication date: 7-Nov-2018
  • (2012)Distributed application tamper detection via continuous software updatesProceedings of the 28th Annual Computer Security Applications Conference10.1145/2420950.2420997(319-328)Online publication date: 3-Dec-2012
  • (2006)Optimizing code‐copying JIT compilers for virtual stack machinesConcurrency and Computation: Practice and Experience10.1002/cpe.101618:11(1465-1484)Online publication date: 12-Jan-2006
  • (2004)Cost‐effective compilation techniques for Java Just‐in‐Time compilersSystems and Computers in Japan10.1002/scj.1056435:12(10-24)Online publication date: Sep-2004
  • (2002)VmgenSoftware—Practice & Experience10.1002/spe.43432:3(265-294)Online publication date: 1-Mar-2002
  • (2001)Implementing an Efficient Java InterpreterHigh-Performance Computing and Networking10.1007/3-540-48228-8_70(613-620)Online publication date: 12-Jul-2001
  • (2001)Pipelined Java Virtual Machine InterpretersCompiler Construction10.1007/3-540-46423-9_3(35-49)Online publication date: 1-Jun-2001
  • (2001)The Behavior of Efficient Virtual Machine Interpreters on Modern ArchitecturesEuro-Par 2001 Parallel Processing10.1007/3-540-44681-8_59(403-413)Online publication date: 17-Aug-2001
  • (2023)AST vs. Bytecode: Interpreters in the Age of Meta-CompilationProceedings of the ACM on Programming Languages10.1145/36228087:OOPSLA2(318-346)Online publication date: 16-Oct-2023
  • 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