Challenges for a Trace-Based Just-In-Time Compiler for Haskell

  • Thomas Schilling
Conference paper

DOI: 10.1007/978-3-642-34407-7_4

Part of the Lecture Notes in Computer Science book series (LNCS, volume 7257)
Cite this paper as:
Schilling T. (2012) Challenges for a Trace-Based Just-In-Time Compiler for Haskell. In: Gill A., Hage J. (eds) Implementation and Application of Functional Languages. IFL 2011. Lecture Notes in Computer Science, vol 7257. Springer, Berlin, Heidelberg


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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Thomas Schilling
    • 1
  1. 1.School of ComputingUniversity of KentUK

Personalised recommendations