From 5f03392fd92a28c073821773c90b69fcbbdb3456 Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Fri, 23 Oct 2026 14:19:18 +0100 Subject: [PATCH] PROPOSALS.md: the hot loop's investigation, and inlining, done --- diff --git a/PROPOSALS.md b/PROPOSALS.md index dbbe7a6..012ccce 100644 --- a/PROPOSALS.md +++ b/PROPOSALS.md @@ -888,6 +888,8 @@ ## Inlining a procedure that only returns +**Status.** Approved by the owner on 2026-10-23 and implemented: a call of a procedure whose body is `return e`, with no locals and one scalar result, is made in place, its arguments in temporaries; a failed check in `e` is told at the callee's line, and the callee is in no trace (scanning 887 ms to 638, grep 268 to 199). + Not the language's but the compiler's: a call of a procedure whose body is `return` and an expression, as `Grep.zeros` and `Scan.tokPos` are, made in place of the call. One pass keeps no @@ -1476,6 +1478,8 @@ and it is `execvp`'s choice. ## An investigation: where a hot loop's time goes + +**Status.** Done 2026-10-23: neither a register allocator nor statement inlining earns its lines; an array parameter indexed as `[pointer + index * size]`, kept parameters in callee-saved registers, and inlining a procedure that only returns, were. Not a change: a measurement, whose report would say whether register allocation, inlining (see "Inlining a procedure that only returns"), diff --git a/doc/compiler.md b/doc/compiler.md index 44fb9e0..b8be922 100644 --- a/doc/compiler.md +++ b/doc/compiler.md @@ -1,6 +1,6 @@ # Reading the raz compiler -The compiler is eleven files of raz, about 12,400 lines of code (the +The compiler is eleven files of raz, about 12,500 lines of code (the budget is 14,000). It is its own compiler: a release of it, the one `BOOT` names, builds `src/`, and `make fixpoint` checks that what it makes makes itself again, byte for byte. Each release was built by the