An OCaml use case for strong call-by-need reduction
summary
Describes a concrete OCaml-compiler change: a strong call-by-need reduction strategy for the module language, implemented as an evaluator inside the compiler written in OCaml. Shows it prevents module-representation blowups that previously produced megabyte-scale duplication, demonstrating orders-of-magnitude size reduction on pathological examples. Presents the actual implementation approach, integration points in the OCaml compiler, and end-to-end results that preserve semantics and compile existing code without regressions.
AI-written summary · about
chapters (10)
- 0:00OCaml use case intro
- 5:06Hermine codebase specifics
- 6:06Spydes of shapes problem
- 8:19Module structure issues
- 12:15Normal form challenges
- 14:24Strong call-by-need reduction
- 15:44Call-by-need in practice
- 16:47Testing with evaluator
- 18:48Lady Fox solution
- 20:19Conclusion & Q&A
related talks
18mA Simple and Efficient Implementation of Strong Call by Need by an Abstract Ma…
15mEfficient Compilation of Algebraic Effect Handlers
15mDuplo: A Framework for OCaml Post-Link Optimisation
24mOn the design and implementation of Modular Explicits
22mEfficient OCaml compilation with Flambda 2
28mImplicit modules, a middle step towards modular implicits
01h 38mGHC Core Optimisations
18mBlame-aware Recomposition for Formally Secure Low-level Compiler Backends
