Escape Analysis and Allocation Discipline
How a ledger-posting path that looks innocent quietly mints garbage on every transaction — reading the compiler's escape-analysis output, and a measured 4× win from allocating only what you keep.
How the compiler decides stack versus heap, how to read -gcflags=-m, and a ledger-posting function taken through three measured versions: 2,056 allocations per batch down to 513 — exactly the values the contract requires to survive — for a 3.9x speedup.