Inlining — Budgets, Costs, PGO, and What Breaks It
Understand Go's inlining cost model, what causes functions to exceed the budget, how PGO changes the decision, and why inlining loss cascades into escape and allocation regressions.
This chapter is part of the paid launch. The preview stays visible so readers can evaluate the exact scope before buying.
Core, Complete, and Team. Complete also includes the practical exam and free Go-version updates.
What this chapter teaches
Extracting a helper function is free; the compiler inlines small functions anyway.
inlining is gated by an AST-node cost budget (80). One node over and the whole function stops inlining — which can cascade into lost escape analysis and new allocations. PGO can raise the budget for hot call sites.
Unlock Chapter 04 and the rest of the course.
Start with your email, then continue to Lemon Squeezy checkout. Core unlocks the paid chapters, Complete adds the exam and free Go-version updates, and Team gives you 5 seats.