The Intel Labs Haskell Research Compiler

被引:7
|
作者
Liu, Hai
Glew, Neal
Petersen, Leaf
Anderson, Todd A.
机构
关键词
Functional Language Compiler; Compiler Optimization; Haskell;
D O I
10.1145/2503778.2503779
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The Glasgow Haskell Compiler (GHC) is a well supported optimizing compiler for the Haskell programming language, along with its own extensions to the language and libraries. Haskell's lazy semantics imposes a runtime model which is in general difficult to implement efficiently. GHC achieves good performance across a wide variety of programs via aggressive optimization taking advantage of the lack of side effects, and by targeting a carefully tuned virtual machine. The Intel Labs Haskell Research Compiler uses GHC as a frontend, but provides a new whole-program optimizing backend by compiling the GHC intermediate representation to a relatively generic functional language compilation platform. We found that GHC's external Core language was relatively easy to use, but reusing GHC's libraries and achieving full compatibility were harder. For certain classes of programs, our platform provides substantial performance benefits over GHC alone, performing 2x faster than GHC with the LLVM backend on selected modern performance-oriented benchmarks; for other classes of programs, the benefits of GHC's tuned virtual machine continue to outweigh the benefits of more aggressive whole program optimization. Overall we achieve parity with GHC with the LLVM backend. In this paper, we describe our Haskell compiler stack, its implementation and optimization approach, and present benchmark results comparing it to GHC.
引用
收藏
页码:105 / 116
页数:12
相关论文
共 50 条
  • [1] MicroHs: A Small Compiler for Haskell
    Augustsson, Lennart
    PROCEEDINGS OF THE 17TH ACM SIGPLAN INTERNATIONAL SYMPOSIUM ON HASKELL, HASKELL 2024, 2024, : 120 - 124
  • [2] A Haskell Compiler for Signal Transforms
    Mainland, Geoffrey
    Johnson, Jeremy
    PROCEEDINGS OF THE 16TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON GENERATIVE PROGRAMMING: CONCEPTS AND EXPERIENCES (GPCE'17), 2017, : 219 - 232
  • [3] A Haskell Compiler for Signal Transforms
    Mainland, Geoffrey
    Johnson, Jeremy
    ACM SIGPLAN NOTICES, 2017, 52 (12) : 219 - 232
  • [4] The Architecture of the Utrecht Haskell Compiler
    Dijkstra, Atze
    Fokker, Jeroen
    Swierstra, S. Doaitse
    HASKELL'09: PROCEEDINGS OF THE 2009 ACM SIGPLAN HASKELL SYMPOSIUM, 2009, : 93 - 104
  • [5] The structure of the Essential Haskell Compiler, or coping with compiler complexity
    Dijkstra, Atze
    Fokker, Jeroen
    Swierstra, S. Doaitse
    IMPLEMENTATION AND APPLICATION OF FUNCTIONAL LANGUAGES, 2008, 5083 : 57 - 74
  • [6] A Type-Preserving Compiler in Haskell
    Guillemette, Louis-Julien
    Monnier, Stefan
    ICFP'08: PROCEEDINGS OF THE 2008 SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, 2008, : 75 - 86
  • [7] Secrets of the Glasgow Haskell Compiler inliner
    Jones, SP
    Marlow, S
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2002, 12 : 393 - 434
  • [8] Transactional Boosting on Glasgow Haskell Compiler
    Conceicao, Jonathas A. O.
    Du Bois, Andre R.
    Ribeiro, Rodrigo G.
    2018 SYMPOSIUM ON HIGH PERFORMANCE COMPUTING SYSTEMS (WSCAD 2018), 2018, : 191 - 197
  • [9] Agate -an agda-to-haskell compiler
    Ozaki, Hiroyuki
    Takeyama, Makoto
    Kinoshita, Yoshiki
    Computer Software, 2009, 26 (04) : 107 - 119
  • [10] A type-preserving compiler in Haskell
    Guillemette, Louis-Julien
    Monnier, Stefan
    ACM SIGPLAN NOTICES, 2008, 43 (09) : 75 - 86