Challenges for a trace-based just-in-time compiler for haskell

  • Authors:
  • Thomas Schilling

  • Affiliations:
  • School of Computing, University of Kent, UK

  • Venue:
  • IFL'11 Proceedings of the 23rd international conference on Implementation and Application of Functional Languages
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Haskell's use of lazy evaluation and type classes has endowed it with enhanced expressiveness, but also poses difficult challenges for compiler writers if high performance is a requirement. Most research so far has used static compilation techniques to solve these issues. In this work, we argue that an implementation based on a virtual machine with a dynamic optimizer based on trace-compilation may be able to remove Haskell's execution overheads with similar efficacy. This could improve on static techniques in the following ways: (1) more predictable optimization in hot spots, (2) cross-module optimization while retaining binary compatibility, and (3) no need to compile multiple module variants for profiling or debugging. We present a work-in-progress prototype that implements a trace-based just-in-time compiler for Haskell and identify the missing pieces of the puzzle required to achieve an implementation that can be competitive with state of the art ahead-of-time Haskell compilers.