June 8, 2026

Inlining? More like infighting

A Survey of Inlining Heuristics

Why tiny bits of code cause huge fights over what old-school classic got snubbed

TLDR: The article says combining tiny chunks of code can unlock big speed gains, but choosing when to do it is a long-term balancing act that can backfire. In the comments, the biggest reaction was outrage that a famous older paper was left out, turning a technical survey into a classics debate.

A deep-dive post about making programs faster somehow turned into a mini fandom war over compiler history. The article itself is about a simple but surprisingly messy idea: when a program keeps hopping between lots of tiny functions, it wastes time and memory, so developers try to fold those little steps together to speed things up. Sounds neat, right? Not so fast. The author basically says getting this trick to work is one thing, but deciding when to use it is the real nightmare, because doing it too much can actually make software slower by bloating it.

And that’s where the comment section smelled blood. The loudest reaction wasn’t “wow, great survey,” but more like: how dare you call this a survey and leave out the old legend? User sanxiyn came in with the classic internet mix of respect and accusation, calling it “criminal” not to include Simon Peyton Jones’s famous Glasgow Haskell Compiler write-up. Translation for normal humans: one reader thinks the article skipped a sacred text of the field, and that omission instantly became the juiciest part of the discussion.

The mood? Equal parts nerd outrage, history-policing, and affectionate gatekeeping. There’s also some dry comedy in the idea that a post about shaving off tiny bits of wasted effort created a whole new pile of emotional overhead in the comments. In true community fashion, the real optimization target turned out to be the author’s reading list.

Key Points

  • The article says method JIT compilers usually optimize one function at a time, which limits available context in dynamic systems.
  • A Ruby Point example is used to show that a simple mathematical operation can expand into many method calls, allocations, and memory accesses.
  • Inlining is presented as the optimization that enables other passes, such as eliminating loads/stores or improving escape analysis effectiveness, to work better.
  • The article distinguishes between implementing the mechanics of inlining and the harder task of deciding when to inline.
  • It states that poor inlining decisions can increase code size, harm CPU cache behavior, and prevent more valuable later optimizations from being applied.

Hottest takes

It is criminal this survey does not include the venerable Secrets of the Glasgow Haskell Compiler inliner — sanxiyn
the classic is a classic for reasons — sanxiyn
venerable Secrets of the Glasgow Haskell Compiler — sanxiyn
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.