Working Hard to Keep Things Lazy
summary
Starts from a buggy length that uses non-tail recursion and eats 632 MB (another variant 903 MB at 10% productivity) and explains why laziness is non-strictness plus sharing by showing how GHC represents delayed computations as thunks and optimizes via Core → STG → C/LLVM. Shows seq and bang patterns vs compiler work when compiling with -O1, demonstrates GHC collapses Haskell loops into constant‑space machine‑integer code and assembly nearly identical to a C for‑loop.
AI-written summary · about
chapters (13)
- 0:00Start
- 2:08First steps
- 5:37Applicative Order
- 6:17Normal Order
- 8:34Lifting Types
- 10:33Monotone Functions
- 13:19Standardization Theorem
- 14:04Hard working non-strictness
- 14:52Laziness non-strictness + sharing
- 17:03Choosing Evaluation Strategies
- 20:34Honorable Mention
- 21:39GHC Compilation Pipeline
- 22:43Revisiting Lifted Types
related talks
02h 38mLazy Evaluation
59mLet's Get Lazy
58mLet’s Get Lazy—The Real Power of Functional Programming
53mIntro to Haskell for Erlangers
01h 38mGHC Core Optimisations
51mStretching the Glasgow Haskell Compiler: Nourishing GHC with Domain-Driven De...
49mLazy Java
24mCatching space leaks at compile-time using th-deepstrict
