GHC Core Optimisations
summary
Desugared System F–style Core appears as a small, explicitly typed IR where case drives evaluation; the talk traces specific passes (strictness/demand analysis, CPR, the worker/wrapper split, inlining and the Simplifier) and shows an example where optimisations cut allocations ~85% and speed doubles. A concrete patch implements common subexpression elimination to look through unfoldings, builds with Hadrian, and makes k collapse to the identity, but the fix exposes deeper interactions suggesting the proper repair belongs in the Simplifier rather than only CSE.
AI-written summary · about
chapters (7)
- 0:00GHC Core optimisations intro
- 1:10GHC Core pipeline basics
- 22:01Optimised Core performance
- 31:26GHC Core optimisations overview
- 50:55Local simplifier optimisations
- 1:01:59Demand analysis & worker/wrapper
- 1:16:10Fixing CSE bug
related talks
01h 28mInto the Core Squeezing Haskell into nine Constructors
55mDeforestation and Program Fusion
36mWorking Hard to Keep Things Lazy
01h 30mGHC Proposal Presentations
21mFlow-Analysis-Based Closure Optimization
14mOne Down, 699 to Go: or, synthesising compositional desugarings
33mLightning Talks II
36mFlexible Instruction-Set Semantics via Abstract Monads
