Storage strategies for collections in dynamically typed languages

  • Authors:
  • Carl Friedrich Bolz;Lukas Diekmann;Laurence Tratt

  • Affiliations:
  • University of Düsseldorf, Düsseldorf, Germany;University of Düsseldorf, Düsseldorf, Germany;King's College London, London, United Kingdom

  • Venue:
  • Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Dynamically typed language implementations often use more memory and execute slower than their statically typed cousins, in part because operations on collections of elements are unoptimised. This paper describes storage strategies, which dynamically optimise collections whose elements are instances of the same primitive type. We implement storage strategies in the PyPy virtual machine, giving a performance increase of 18% on wide-ranging benchmarks of real Python programs. We show that storage strategies are simple to implement, needing only 1500LoC in PyPy, and have applicability to a wide range of virtual machines.