From e9f53dc8a56ddca0855213da4355f39a69306c07 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 19 Oct 2026 00:40:55 +0100 Subject: 027's 4f-4: loops nested to any depth: the load counts a module's deepest nesting (nesting), a run keeping PURE_MODULE_NESTING (8) on its stack as before and a module nesting deeper running in the executor that calls, its loops in its app's room (PureApp.deep, grown to it), so run()'s hot path is as it was; the JIT compiles modules nesting 8 at most; a function's nesting counted without a cap (u32), its frame sized to it; unit test: 40 loops nested, run to their end (2^20 rounds) and stopped by the work budget (2^40), 8 still on the stack; counts: b42 against b41 with batches BFS -0.12%, without BFS +0.09%, the rest within 0.001%; the bank's queries (s41 and s42 in turns, six each) in_credit +1.04%, per_branch +0.60%, ranks +0.36%, the rest within 0.01% (their spread: the bank has no functions, so none runs the changed executor, and s42's in_credit is within s41's own earlier six); 008 and 027 --- core/module-run.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/module-run.h') diff --git a/core/module-run.h b/core/module-run.h index cff3f71..e79aa59 100644 --- a/core/module-run.h +++ b/core/module-run.h @@ -135,7 +135,7 @@ typedef struct { PureFault kind; /* a fault's */ PureResult status; /* what refused or stopped it */ uint32_t fault_pc; /* the instruction that faulted or refused */ - Loop *loops; /* PURE_MODULE_NESTING of them, apart: a walk points into its loop */ + Loop *loops; /* the module's nesting of them (PURE_MODULE_NESTING on the stack, more the app's), apart: a walk points into its loop */ /* The run of a tree compiled code read an item from last (pure_run_item): * the list as it was (its version), its positions and each field's cells. */ struct { const PureList *list; uint64_t version; size_t start, count; const void *columns[16]; } run; -- cgit v1.2.3