Code sharing among states for stack-caching interpreter
Jinzhan Peng, Gansha Wu, Guei-Yuan Lueh · 2004
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%).
Cited by 7 works. doi:10.1145/1059579.1059584
Authors
References
- Java Virtual Machine Specification
- Optimizing direct threaded code by selective inlining
- Optimizing an ANSI C interpreter with superoperators
- Vmgen—a generator of efficient virtual machine interpreters
- Stack caching for interpreters
- The Structure and Performance of Efficient Interpreters.
- Optimizing indirect branch prediction accuracy in virtual machine interpreters
- Optimizing indirect branch prediction accuracy in virtual machine interpreters
- Pipelined Java Virtual Machine Interpreters
- Bytecode fetch optimization for a Java interpreter