Efficient compilation of lazy evaluation

  • Authors:
  • Thomas Johnsson

  • Affiliations:
  • Chalmers University of Technology, S-412 96 Göteborg, Sweden

  • Venue:
  • SIGPLAN '84 Proceedings of the 1984 SIGPLAN symposium on Compiler construction
  • Year:
  • 1984

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.