SPLASH 2023
Sun 22 - Fri 27 October 2023 Cascais, Portugal
Mon 23 Oct 2023 17:00 - 17:30 at Room XV - Session 4 Chair(s): Casper Bach Poulsen

Abstract syntax tree (AST) interpreters allow implementing programming languages in a straight-forward way. However, AST interpreters implemented in object-oriented languages, such as e.g. in Java, often suffer from two serious performance issues. First, these interpreters commonly implement AST nodes by leveraging class inheritance and polymorphism, leading to many polymorphic call sites in the interpreter implementation and hence lowering interpreter performance. Second, widely used implementations of these interpreters throw costly runtime exceptions to model the control flow. Even though Just-in-Time (JIT) compilation mitigates these issues, performance in the first stages of the program execution remains poor.

In this paper, we propose a novel technique to improve both interpreter performance and steady-state performance, lowering also the pressure on the JIT compiler. Our technique automatically generates AST supernodes ahead-of-time, i.e., we automatically generate compound AST-node classes that encode the behavior of several other primitive AST nodes before the execution of the application. Our technique extracts common control-flow structures from an arbitrary, given set of ASTs, such as e.g. the functions of popular packages. It is based on matchmaking of AST structures, instantiation of matching supernodes, and replacement the corresponding AST subtrees with the instantiated supernodes at load-time. We implement our technique in the GraalVM JavaScript engine, showing that our supernodes lead to an average interpreter speedup of $1.24\times$, an average steady-state speedup of $1.14\times$, and an average just-in-time compilation speedup of $1.33\times$ on the web-tooling benchmark suite.

Mon 23 Oct

Displayed time zone: Lisbon change

16:00 - 17:30
Session 4GPCE at Room XV
Chair(s): Casper Bach Poulsen Delft University of Technology
16:00
30m
Talk
Virtual Domain Specific Languages via Embedded Projectional Editing
GPCE
Niklas Korz Alugha GmbH, Artur Andrzejak Heidelberg University
16:30
30m
Talk
Unleashing the Power of Implicit Feedback in Software Product Lines: Benefits ahead
GPCE
Raul Medeiros University of the Basque Country (UPV/EHU), Oscar Diaz University of the Basque Country, Spain, David Benavides Universidad de Sevilla
17:00
30m
Talk
Automatically Generated Supernodes for AST Interpreters Improve Virtual-machine Performance
GPCE
Matteo Basso Università della Svizzera italiana (USI), Switzerland, Daniele Bonetta Oracle Labs, Walter Binder USI Lugano