The construction of high-performance virtual machines for dynamic languages

Shannon, Mark (2011) The construction of high-performance virtual machines for dynamic languages. PhD thesis, University of Glasgow.

Full text available as:
[thumbnail of 2011shannonphd.pdf] PDF
Download (2MB)
Printed Thesis Information:


Dynamic languages, such as Python and Ruby, have become more widely used over the past decade. Despite this, the standard virtual machines for these languages have disappointing performance. These virtual machines are slow, not because methods for achieving better performance are unknown, but because their implementation is hard. What makes the implementation of high-performance virtual machines difficult is not that they are large pieces of software, but that there are fundamental and complex interdependencies between their components. In order to work together correctly, the interpreter, just-in-time compiler, garbage collector and library must all conform to the same precise low-level protocols.

In this dissertation I describe a method for constructing virtual machines for dynamic languages, and explain how to design a virtual machine toolkit by building it around an abstract machine. The design and implementation of such a toolkit, the Glasgow Virtual Machine Toolkit, is described. The Glasgow Virtual Machine Toolkit automatically generates a just-in-time compiler, integrates precise garbage collection into the virtual machine, and automatically manages the complex inter-dependencies between all the virtual machine components.

Two different virtual machines have been constructed using the GVMT. One is a minimal implementation of Scheme; which was implemented in under three weeks to demonstrate that toolkits like the GVMT can enable the easy construction of virtual machines. The second, the HotPy VM for Python, is a high-performance virtual machine; it demonstrates that a virtual machine built with a toolkit can be fast and that the use of a toolkit does not overly constrain the high-level design. Evaluation shows that HotPy outperforms the standard Python interpreter, CPython, by a large margin, and has performance on a par with PyPy, the fastest Python VM currently available.

Item Type: Thesis (PhD)
Qualification Level: Doctoral
Keywords: Virtual Machine, Software Engineering, Compilers, Garbage Collection
Subjects: Q Science > QA Mathematics > QA75 Electronic computers. Computer science
Colleges/Schools: College of Science and Engineering > School of Computing Science
Supervisor's Name: Watt, Professor David A.
Date of Award: 2011
Depositing User: Dr Mark Shannon
Unique ID: glathesis:2011-2975
Copyright: Copyright of this thesis is held by the author.
Date Deposited: 14 Nov 2011
Last Modified: 10 Dec 2012 14:02

Actions (login required)

View Item View Item


Downloads per month over past year