@gron

Accelerating Iterators in Optimizing AST Interpreters

, , , and . Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages &\#38; Applications, page 727--743. ACM, (2014)
DOI: 10.1145/2660193.2660223

Abstract

Generators offer an elegant way to express iterators. However, their performance has always been their Achilles heel and has prevented widespread adoption. We present techniques to efficiently implement and optimize generators. We have implemented our optimizations in ZipPy, a modern, light-weight AST interpreter based Python 3 implementation targeting the Java virtual machine. Our implementation builds on a framework that optimizes AST interpreters using just-in-time compilation. In such a system, it is crucial that AST optimizations do not prevent subsequent optimizations. Our system was carefully designed to avoid this problem. We report an average speedup of 3.58x for generator-bound programs. As a result, using generators no longer has downsides and programmers are free to enjoy their upsides.

Description

Accelerating iterators in optimizing AST interpreters

Links and resources

Tags

community

  • @gron
  • @dblp
@gron's tags highlighted