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%).
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Intel Corporation. Intel XScale Microarchitecture for the PXA255 processor: Use's Manual, March 2003.]]Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- M. Anton Ertl and David Gregg, The structure and performance of efficient interpreters, in Journal of Instruction-Level Parallelism, vol. 5, November 2003.]]Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- M. Anton Ertl. Implementation of Stack-Based Languages on Register Machines. Dissertation, Technische Universitat Wien, Austria, 1996]]Google Scholar
- Lindholm, T. and Yellin, F., The Java Virtual Machine Specification. Addison Wesley, Reading, MA, 1997.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 Scholar
Index Terms
- Code sharing among states for stack-caching interpreter
Recommendations
Virtual machine showdown: Stack versus registers
Virtual machines (VMs) enable the distribution of programs in an architecture-neutral format, which can easily be interpreted or compiled. A long-running question in the design of VMs is whether a stack architecture or register architecture can be ...
Combining stack caching with dynamic superinstructions
IVME '04: Proceedings of the 2004 workshop on Interpreters, virtual machines and emulatorsDynamic superinstructions eliminate most of the interpreter dispatch overhead. This results in a higher proportion of interpreter time spent in stack accesses (on a stack-based virtual machine). Stack caching reduces the stack access overhead. Each of ...
Optimizing code-copying JIT compilers for virtual stack machines: Research Articles
10th International Workshop on Compilers for Parallel Computers (CPC 2003)Just-in-time (JIT) compilers are widely used to implement stack-based virtual machines, such as the Java and .NET virtual machines. One disadvantage of most JIT compilers is that they are unportable; much of the back-end is specific to the target ...
Comments