Storage strategies have been proposed as a run-time optimization for the PyPy Python implementation and have shown promising results for optimizing execution speed and memory requirements. However, it remained unclear whether the approach works equally well in other dynamic languages. Furthermore, while PyPy is based on RPython, a language to write VMs with reusable components such as a tracing just-in-time compiler and garbage collection, the strategies design itself was not generalized to be reusable across languages implemented using that same toolchain. In this paper, we present a general design and implementation for storage strategies and show how they can be reused across different RPython-based languages. We evaluate the performance of our implementation for RSqueak, an RPython-based VM for Squeak/Smalltalk and show that storage strategies may indeed offer performance benefits for certain workloads in other dynamic programming languages.We furthermore evaluate the generality of our implementation by applying it to Topaz, a Ruby VM, and Pycket, a Racket implementation.
[1]
Tomas Kalibera,et al.
Rigorous benchmarking in reasonable time
,
2013,
ISMM '13.
[2]
Michael Leuschel,et al.
Allocation removal by partial evaluation in a tracing JIT
,
2011,
PEPM '11.
[3]
Benjamin Goldberg,et al.
Higher Order Escape Analysis: Optimizing Stack Allocation in Functional Program Implementations
,
1990,
ESOP.
[4]
Matthias Felleisen,et al.
Classes and mixins
,
1998,
POPL '98.
[5]
Christian Wimmer,et al.
Truffle: a self-optimizing runtime system
,
2012,
SPLASH '12.
[6]
William R. Cook,et al.
Mixin-based inheritance
,
1990,
OOPSLA/ECOOP '90.
[7]
Sam Tobin-Hochstadt,et al.
Pycket: a tracing JIT for a functional language
,
2015,
ICFP.
[8]
Laurence Tratt,et al.
Storage strategies for collections in dynamically typed languages
,
2013,
OOPSLA.