Optimizing interpreters by tuning opcode orderings on virtual machines for modern architectures
File Type:
PDFItem Type:
Conference PaperDate:
2011Citation:
J. McCandless and D. Gregg, Optimizing interpreters by tuning opcode orderings on virtual machines for modern architectures, Conference on the Principles and Practice of Programming in Java, PPPJ 11, Kongens Lyngby, Denmark, August 24-26, 2011, ACM, 2011, 161 - 170Download Item:
Abstract:
Virtual machines (VMs) are commonly used to implement programming languages such as Java, Python and Lua. VMs are typically implemented using an interpreter, a JIT compiler, or some combination of the two. A long-standing question in the design of VM interpreters is whether it is worthwhile to reorder the cases in
the main interpreter loop to improve code locality. We investigate this phenomenon using an iterative, feedback-directed approach. We show that the ordering of the cases in the interpreter loop has a signi?cant impact on performance on recent processors. Using hardware performance counters, we demonstrate that the performance improvement is primarily the result of indirect branch prediction, not instruction cache locality. We propose a number of strategies to achieve better orderings, and evaluate these strategies in the Python and Lua virtual machine interpreters. We show speedups of up to 40%.
Sponsor
Grant Number
Irish Research Council for Science Engineering and Technology
Author's Homepage:
http://people.tcd.ie/mccandjmhttp://people.tcd.ie/dgregg
Description:
PUBLISHED
Author: GREGG, DAVID; MCCANDLESS, JASON MARSHALL
Sponsor:
Irish Research Council for Science Engineering and TechnologyOther Titles:
Conference on the Principles and Practice of Programming in Java, PPPJ 11Publisher:
ACMType of material:
Conference PaperCollections
Availability:
Full text availableKeywords:
Computer sciences, Programming, Virtual machines, Lua, PythonMetadata
Show full item recordLicences: