Representation-based just-in-time specialization and the psyco prototype for python

  • Authors:
  • Armin Rigo

  • Affiliations:
  • University of Southampton, United Kingdom

  • Venue:
  • Proceedings of the 2004 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

A powerful application of specialization is to remove interpretative overhead: a language can be implemented with an interpreter, whose performance is then improved by specializing it for a given program source. This approach is only moderately successful with very high level languages, where the operation of each single step can be highly dependent on run-time data and context. In the present paper, the Psyco prototype for the Python language is presented. It introduces two novel techniques. The first is just-in-time specialization, or specialization by need, which introduces the "unlifting" ability for a value to be promoted from run-time to compile-time during specialization -- the inverse of the lift operator of partial evaluation. Its presence gives an unusual and powerful perspective on the specialization process. The second technique is representations, a theory of data-oriented specialization generalizing the traditional specialization domains (i.e. the compile-time/run-time dichotomy).