Efficient compilation of lazy evaluation

  • Authors:
  • Thomas Johnsson

  • Affiliations:
  • CR&T, Stora Badhusgatan, Gööteborg, Sweden

  • Venue:
  • ACM SIGPLAN Notices - Best of PLDI 1979-1999
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper describes the principles underlying an efficient implementation of a lazy functional language, compiling to code for ordinary computers. It is based on combinator-like graph reduction: the user defined functions are used as rewrite rules in the graph. Each function is compiled into an instruction sequence for an abstract graph reduction machine, called the G-machine, the code reduces a function application graph to its value. The G-machine instructions are then translated into target code. Speed improvements by almost two orders of magnitude over previous lazy evaluators have been measured; we provide some performance figures.