Intel Haskell Research Compiler
github.com
Intel Haskell Research Compiler
1–10 of 39 posts
Re: Intel Haskell Research Compiler
#2> FLRC is open sourced as is. We at Intel Labs are no longer actively working on this compiler.
Re: Intel Haskell Research Compiler
#3Re: Intel Haskell Research Compiler
#4Wait... what? "To actually compile a Haskell program, we'll also need a patched version of GHC. See Building and Using GHC with HRC for more information."
Re: Intel Haskell Research Compiler
#5GHC can use this intermediate code (a-la LLVM) to produce executable. The idea is to create an intermediate code which is better optimised for their CPU.
Re: Intel Haskell Research Compiler
#6I can't wait to dig in and finally learn more than I could at after-conference drinks :-)
Re: Intel Haskell Research Compiler
#7> 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.
and later:
> 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.
Source: https://www.semanticscholar.org/paper/The-Intel-labs-Haskell...
Re: Intel Haskell Research Compiler
#8Re: Intel Haskell Research Compiler
#9Wait... what? "To actually compile a Haskell program, we'll also need a patched version of GHC. See Building and Using GHC with HRC for more information."
Parsing the language isn't a very interesting research problem, and more work than it's worth, so Intel have chosen to instead use GHC's frontend to generate Core code, and then consume Core for their compiler backend.
Re: Intel Haskell Research Compiler
#10It's interesting that HRC makes relatively significantly optimized programs (up to 2x), but that GHC's runtime (which HRC is not using) is so well optimized that the performance of HRC programs is roughly on par with those from GHC, despite the programs themselves being more performant.
I find stuff like this to be a testament to the practicality of great design in functional programming language ecosystems: Even the compilers are composable!
[0]: For those unfamiliar with what GHC does/how it's designed, this talk gives a great overview of the Core language that is the optimized IR of GHC: https://www.youtube.com/watch?v=uR_VzYxvbxg