Efficient Bytecode Verification and Compilation in a Virtual Machine
Applications written in modern dynamic languages such as Java or .NET are shipped in the form of high-level intermediate bytecode. A virtual machine (VM) is used on the target machine to verify and execute the code. Many VMs use just-in-time compilation to speed-up the execution of critical code areas for which interpretation alone is not efficient enough.
We explore existing verification and dynamic compilation techniques. These traditional approaches do not work well in resource-constrained environments such as PDAs and cell phones. We propose alternative verification and compilation techniques that were specifically designed for efficient runtime code generation. Our prototype virtual machine can generate code 350 times faster than existing desktop VMs, and is 30 times more memory efficient, yet achieves execution performance that is much higher than that of existing embedded VMs and closer to the performance of heavyweight desktop systems.