Combining stack caching with dynamic superinstructions

M. Anton Ertl, David Gregg
2004 Proceedings of the 2004 workshop on Interpreters, virtual machines and emulators - IVME '04  
Dynamic 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 these optimizations provides more speedup, if the other one is applied, too. Combining these optimizations also opens additional opportunities: we can insert stack state transitions without dispatch cost; this reduces the number of necessary VM
more » ... of necessary VM instruction instances significantly. A shortest-path search can find the optimal sequence of state transitions and VM instructions. In this paper we describe an implementation of static stack caching employing these ideas. We also represent empirical results for our implementation, resulting in a speedup of up to 58% over a version that keeps one value in registers all the time.
doi:10.1145/1059579.1059583 fatcat:idyhkornxfdb5jhqh6xypz37ga