| | @@ -19,4 +19,21 @@ |
| 19 | 19 | ## Wishes, for a later thaw |
| 20 | 20 | |
| 21 | 21 | What the language or the library might have, met while writing raz; |
| 22 | | -none is built while the freeze holds. None waits now. |
| 22 | +none is built while the freeze holds. |
| 23 | + |
| 24 | +- **`inline`, a hint.** `proc zeros(v: U64): U64; inline;`, placed as |
| 25 | + `forward` is: the compiler copies the procedure into each call |
| 26 | + instead of calling it. A hint an implementation may ignore, so a |
| 27 | + program means the same everywhere and `conform/` is untouched. This |
| 28 | + compiler would take it for a procedure whose body is a single |
| 29 | + `return e`, with value parameters, in the same module, and refuse |
| 30 | + the mark on any other: the call site's arguments go to temporaries |
| 31 | + and `e` is read again there (`SaveScan`/`RestoreScan`, as for |
| 32 | + generic instances), its parameters bound to them. About 100 lines. |
| 33 | + Measured (2026-10-13): `test/bench/Grep` with its two helpers |
| 34 | + inlined by hand ran 188 ms against 250, 30% off the kernel's own |
| 35 | + time, since the loop's values then stay in registers, not the |
| 36 | + frame; FPC `-O2` with `inline` gains as much. `tools/Pretty` gained |
| 37 | + nothing: its small procedures cost their work, not their calls. |
| 38 | + Open: where gdb and a failure place a line inside an inlined |
| 39 | + procedure, the callee's or the caller's. |