Simple, effective code-size reduction for functional programs

  • Authors:
  • Ekaterina Stefanov;Anthony M. Sloane

  • Affiliations:
  • Department of Computing, Macquarie University;Department of Computing, Macquarie University

  • Venue:
  • IFL'04 Proceedings of the 16th international conference on Implementation and Application of Functional Languages
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Code-size reduction is an important area of investigation for computer system developers due to the increasing use of technologies such as communication networks and embedded systems for which program size is an important factor. A new software-based method of program compression for languages with interpreter-based runtime systems is described. The method employs a modified version of a standard dictionary-based text compression algorithm to produce a shorter encoding for a given program and a runtime system tailored for it. In comparison with previous software-based code-size reduction methods the new method is simpler to implement and imposes lower overhead at compile time. Its performance on a representative suite of Haskell programs is analysed. Executable space savings of 16–26% are achieved as a result of code compression, exclusion of unused instructions from the runtime, and inclusion of the standard library in the optimisation. To the best of the authors' knowledge, this is the first work on running compressed code for a purely declarative and functional language.