Hkvl1j0lzx3gmbllw7j2
SkillsCast

Keynote: Compiling without Continuations

12th October 2017 in London at CodeNode

There are 36 other SkillsCasts available from Haskell eXchange 2017

Please log in to watch this conference skillscast.

660644850 640

GHC compiles Haskell via Core, a tiny intermediate language based closely on the lambda calculus. Almost all GHC’s optimisations happen in Core, but until recently there was an important kind of optimisation that Core really did not handle well. In this talk, you will learn what the problem was, and how Core’s new “join points” solve it simply and beautifully, by effectively allowing Core to express control flow as well as data flow; there are strong links to so-called “continuation passing style” (CPS) here. On the way, you will explore how GHC’s Mighty Simplifier, which is responsible for many optimisations, works.

Understanding join points can help you are a programmer too, because you can write code confident that it will optimise well. You will discover a rather compelling example this: “skip-less streams” now fuse well, for the first time, which allows us to drop the previous (ingenious but awkward) workarounds.

YOU MAY ALSO LIKE:

Thanks to our sponsors

Keynote: Compiling without Continuations

Simon Peyton Jones

Simon Peyton Jones, MA, MBCS, CEng, graduated from Trinity College Cambridge in 1980. Simon was a key contributor to the design of the now-standard functional language Haskell, and is the lead designer of the widely-used Glasgow Haskell Compiler (GHC). He has written two textbooks about the implementation of functional languages.

SkillsCast

Please log in to watch this conference skillscast.

660644850 640

GHC compiles Haskell via Core, a tiny intermediate language based closely on the lambda calculus. Almost all GHC’s optimisations happen in Core, but until recently there was an important kind of optimisation that Core really did not handle well. In this talk, you will learn what the problem was, and how Core’s new “join points” solve it simply and beautifully, by effectively allowing Core to express control flow as well as data flow; there are strong links to so-called “continuation passing style” (CPS) here. On the way, you will explore how GHC’s Mighty Simplifier, which is responsible for many optimisations, works.

Understanding join points can help you are a programmer too, because you can write code confident that it will optimise well. You will discover a rather compelling example this: “skip-less streams” now fuse well, for the first time, which allows us to drop the previous (ingenious but awkward) workarounds.

YOU MAY ALSO LIKE:

Thanks to our sponsors

About the Speaker

Keynote: Compiling without Continuations

Simon Peyton Jones

Simon Peyton Jones, MA, MBCS, CEng, graduated from Trinity College Cambridge in 1980. Simon was a key contributor to the design of the now-standard functional language Haskell, and is the lead designer of the widely-used Glasgow Haskell Compiler (GHC). He has written two textbooks about the implementation of functional languages.

Photos