From 3623192c2c024bcc0ba277b9a4ca57d8efde5034 Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Tue, 13 Oct 2026 12:19:51 +0100 Subject: [PATCH] PLAN: inline, measured on rat; the hint dropped --- diff --git a/PLAN.md b/PLAN.md index c9d8a6a..fbdd774 100644 --- a/PLAN.md +++ b/PLAN.md @@ -80,5 +80,18 @@ time, since the loop's values then stay in registers, not the frame; FPC `-O2` with `inline` gains as much. `tools/Pretty` gained nothing: its small procedures cost their work, not their calls. - Open: where gdb and a failure place a line inside an inlined - procedure, the callee's or the caller's. + Dropped as a language change (2026-10-13): a hint means nothing a + program can see, and this compiler can inline by itself, with no + keyword. Debugging would be settled by keeping the callee's lines + in the line table as rows that aren't statements (DWARF's + `is_stmt`): gdb steps over them, `Rt` still tells a failure at its + expression; only `Rt.trace` loses the callee's frame. + Measured on rat's 26 MB workload (477 ms): its hot procedures are + almost never a single `return e`, and inlining those by hand gained + nothing. What did gain, 12%, was hoisting the fast path of two small + procedures into their callers by hand: `Width.cells` (`if c < 300H + then return 1`) and `Screen.unsplit` (a guard, then rare work), + called for every character. An inliner for that, statements and + early returns and procedures without results, is several times the + size; the same 12% is a few lines in rat. Revisit only if more + programs show it.