Optimising for fast builds with GHC
summary
Shows a workflow and tools to cut Haskell compile time: use the GHC build stats plugin to list slow modules and emit traces, find the package or module critical path (example 23s of a 55s build), and benchmark changes in CI. Practical fixes include a binary search to isolate hot definitions, remove reexports, split interface vs implementation, avoid indiscriminate INLINE/specialization, and prefer 8 physical cores per GHC job for best memory/parallelism tradeoffs.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 3:15Build time factors
- 9:12Parallelism and caching
- 11:25Benchmarking slow modules
- 15:45Debugging with core analysis
- 21:03Package structure for parallel builds
- 26:45Module dependencies and interfaces
- 30:59Package graphs optimization
- 38:01Best practices for fast builds
- 39:50Q&A on GHC parallelism
- 53:15Architecture for build performance
- 56:26Tools for module graphs
- 58:15Critical path metrics
- 1:00:26Q&A and closing
related talks
32mCode as Data: Extracting & Analyzing Info from Haskell Codebases
18mInvestigating Magic Numbers: Improving the Inlining Heuristic in the Glasgow ...
01h 04mNot-So-Boring Haskell
47mIndustrial Strength Laziness: What's Next?
01h 22mGetting Up and Running, and Contributing to GHC
53mFalling Skies: Haskell Tooling and Ecosystem Growth
01h 26mReflections on Haskell@Meta
01h 24mWhat we have learned about memory profiling in the last 5 years
