Toward Presizing and Pretransitioning Strategies for GraalPython

Toward Presizing and Pretransitioning Strategies for GraalPython

Johannes Henning, Tim Felgentreff, Fabio Niephaus, Robert Hirschfeld

23 March 2020

Presizing and pretransitioning are run-time optimizations that reduce reallocations of lists. These two optimizations have previously been implemented (together with pretenuring) using Mementos in the V8 Javascript engine. The design of Mementos, however, relies on the support of the garbage collector (GC) of the V8 runtime system.

In contrast to V8, dynamic language runtimes written for the GraalVM do not have access to the GC. Thus, the prior work cannot be applied directly. Instead, an alternative implementation approach without reliance on the GC is needed and poses different challenges.

In this paper we explore and analyze an approach for implementing these two optimizations in the context of GraalVM, using the Python implementation for GraalVM as an example. We substantiate these thoughts with rough performance numbers taken from our prototype on which we tested different presizing strategies.

Venue : MoreVMs 2020

External Link: