Register-Based and Stack-Based Virtual Machines: Which Perform Better in JIT Compilation Scenarios?

Register-Based and Stack-Based Virtual Machines: Which Perform Better in JIT Compilation Scenarios?

Just-In-Time (JIT) compilation plays a critical role in optimizing the performance of modern virtual machines (VMs). While the architecture of VMs–register-based or stack-based–has long been a subject of debate, empirical analysis focusing on JIT compilation performance is relatively sparse. In this study, we aim to answer the question: "Register-based and stack-based virtual machines: which perform better in JIT compilation scenarios?" We explore this through a comprehensive set of benchmarks measuring execution speed. To achieve this, we developed identical test cases in languages that support both types of VM architectures and ran these tests under controlled conditions. The performance metrics were captured and analyzed for JIT compilation, including initial interpretation, bytecode translation, and optimized code execution. Our findings suggest that register-based VMs generally outperform stack-based VMs in terms of execution speed. Moreover, the performance gap between the two architectures in mixed execution mode, which essentially copies characteristics of the underlying virtual machine, suggests that making the right choice of VM architecture is still important. This study provides developers, researchers, and system architects with actionable insights into the performance trade-offs associated with each VM architecture in JIT-compiled environments. The findings can guide the design decisions in the development of new virtual machines and JIT compilation strategies.

You will find the article also on the publisher's website.

Keywords: just-in-time compilation; register-based VMs; stack-based VMs; virtual machines

Year: 2025

Journal ISSN: 0038-0644
Download: download Full text [1412 kB]

Authors of this publication:


Dalibor Fiala


Phone: +420 377 63 2429
E-mail: dalfia@kiv.zcu.cz
WWW: http://www.kiv.zcu.cz/~dalfia/

Dalibor is the former research group coordinator, an analyst with CCA Group a.s., and an associate professor at the Department of Computer Science and Engineering at the University of West Bohemia in Pilsen, Czech Republic. He is interested in data mining, web mining, information retrieval, informetrics, and information science.

Martin Dostal


E-mail: madostal@kiv.zcu.cz

Martin graduated from the University of West Bohemia in 2009, specialized in software engineering. He is interested in the semantic Web, information retrieval, and question answering.