In Proceedings

Practical Partial Evaluation for High-Performance Dynamic Language Runtimes
November 2016

Most high-performance dynamic language virtual machines duplicate language semantics in the interpreter, compiler, and runtime system, violating the principle to not repeat yourself. In contrast, we define languages solely by writing an interpreter. Compiled code is derived automatically using partial evaluation (the first Futamura projection). The interpreter performs specializations, e.g., augments the interpreted program with type information and profiling information. Partial evaluation incorporates these specializations. This makes partial evaluation practical in the context of dynamic languages, because it reduces the size of the compiled code while still compiling in all parts of an operation that are relevant for a particular program. Deoptimization to the interpreter, re-specialization in the interpreter, and recompilation embrace the dynamic nature of languages. We evaluate our approach comparing newly built JavaScript, Ruby, and R runtimes with current specialized production implementations of those languages. Our general purpose compilation system is competitive with production systems even when they have been heavily specialized and optimized for one language.

Authors: Thomas Wuerthinger, Christian Wimmer, Christian Humer, Andreas Woess, Lukas Stadler, Chris Seaton, Gilles Duboscq, Douglas Simon, Matthias Grimmer

Venue: PLDI 2017: June 19-21, Barcelona, Spain, http://conf.researchr.org/track/pldi-2017/pldi-2017-papers

Content:

Hardware and Software, Engineered to Work Together