Investigating Magic Numbers: Improving the Inlining Heuristic in the Glasgow ...
summary
Explores changing GHC’s hard-coded inliner “magic numbers” by turning ten tuning constants into parameters, compiling GHC with different settings and running a 10-package benchmark (using Stackage samples and inline pragmas) across 320 random configurations; finds inline pragmas give on average +10% speed, exhaustive per-program search yields +27% but is impractical, a single new global configuration gives +22% on average, and a simple machine learning model that predicts per-program configuration achieves about 26% improvement; artifacts and dataset accompany the study.
AI-written summary · about
chapters (8)
- 0:00Inlining research introduction
- 4:16Inline pragmas insights
- 8:06Magic numbers in GHC inliner
- 10:30Randomizing magic numbers
- 12:41Geometric mean speedup
- 14:08Random search effectiveness
- 16:56Naive clustering results
- 17:41Future directions
related talks
01h 02mOptimising for fast builds with GHC
01h 26mReflections on Haskell@Meta
01h 38mGHC Core Optimisations
01h 11mHaskell in Industry: Expert Panel on Tooling, Teaching & Real-World Use
36mGHC Status Report
36mLightning Talks
01h 28mInto the Core Squeezing Haskell into nine Constructors
01h 35mSecrets of the GHC Typechecker in 100 Type Declarations
