Code sharing among states for stack-caching interpreter

Code sharing among states for stack-caching interpreter
复制标题

堆栈缓存解释器的状态之间的代码共享

DOI:
--
复制
发表时间:
2004
期刊:
Workshop on Interpreters, Virtual Machines and Emulators
影响因子:
--
通讯作者:
Guei
Guei
中科院分区:
--
文献类型:
--
作者:
Jinzhan Peng;Gansha Wu;Guei

文献摘要

被引文献

相似文献

解释具有简单、可移植和占用空间小的突出优点,但其代价是性能不佳。堆栈缓存是一种通过将指令的源操作数和目的操作数保存在寄存器中以减少解释过程中涉及的内存访问来构建高性能解释器的技术。堆栈缓存的一个缺点是,一条指令可能有多种方式来执行解释,这取决于源操作数驻留在哪些寄存器中,导致代码爆炸以及代码可维护性的恶化。本文提出了一种代码共享机制,实现了高效的堆栈缓存解释器的性能,并在同一时间保持一般线程解释器的代码大小紧凑。我们的结果表明,我们的方法比线程解释器平均高出13.6%,代码大小仅增加1 KB(~3%)。
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%).