Title
Practical partial evaluation for high-performance dynamic language runtimes.
Abstract
Most high-performance dynamic language virtual machines duplicate language semantics in the interpreter, compiler, and runtime system. This violates the principle to not repeat yourself. In contrast, we define languages solely by writing an interpreter. The interpreter performs specializations, e.g., augments the interpreted program with type information and profiling information. Compiled code is derived automatically using partial evaluation while incorporating these specializations. This makes partial evaluation practical in the context of dynamic languages: It reduces the size of the compiled code while still compiling all parts of an operation that are relevant for a particular program. When a speculation fails, execution transfers back to the interpreter, the program re-specializes in the interpreter, and later partial evaluation again transforms the new state of the interpreter to compiled code. We evaluate our approach by comparing our implementations of JavaScript, Ruby, and R with best-in-class specialized production implementations. Our general-purpose compilation system is competitive with production systems even when they have been heavily optimized for the one language they support. For our set of benchmarks, our speedup relative to the V8 JavaScript VM is 0.83x, relative to JRuby is 3.8x, and relative to GNU R is 5x.
Year
DOI
Venue
2017
10.1145/3062341.3062381
PLDI
Keywords
Field
DocType
dynamic languages,virtual machine,language implementation,optimization,partial evaluation
Programming language,Computer science,Partial evaluation,Interpreter pattern,Compiled language,Theoretical computer science,Compiler,Interpreter,Interpreted language,JavaScript,Runtime system
Conference
Volume
Issue
ISSN
52
6
0362-1340
Citations 
PageRank 
References 
12
0.53
42
Authors
9
Name
Order
Citations
PageRank
Thomas Würthinger139625.63
Christian Wimmer21127.03
Christian Humer3381.82
Andreas Wöß41435.55
Lukas Stadler529517.19
Chris Seaton6945.68
Gilles Duboscq721110.10
Doug Simon817116.15
Matthias Grimmer9636.19