From d0558a3a728af8c6c0d8bef2ce7fa55565c518a5 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Thu, 8 Oct 2026 11:28:07 +0100 Subject: Batch: general cuts (docs/research/131). A value computed by the same code as an earlier one in a line of the block (nothing between setting what it reads: planned at load, reuse_from and reuse_length) is taken from the earlier, kept for it; if !c { ... } one branch the other way, no NOT; an arm whose lanes are a quarter or fewer runs in those lanes alone (a selection: outer values gathered by sel, reductions into their lanes around, locals set given back masked at its end, stores and sums expanded, appends and a filter's kept rounds by sel; PURE_SELECT=all every straight arm, 0 none); a list whose keys are bits asked by them in one loop of lanes, a filter decided by its bits and bits of our own (no hash set; a key with no bit is not there); L.first + i affine while within the list; a slice's two bounds in one call (pure_list_slice); a filter's kept rounds copied from numbers made once. The suite's BFS 211 to 112 instructions an edge (the compiled code 38.5), 41.0 to 23.5 ms; the frontier sum 70 to 56 (35). Seeds 1, 2, 3, 5, 23 alike by default and with every arm selected --- core/module-run.h | 1 + 1 file changed, 1 insertion(+) (limited to 'core/module-run.h') diff --git a/core/module-run.h b/core/module-run.h index 67641ed..eeca98a 100644 --- a/core/module-run.h +++ b/core/module-run.h @@ -61,6 +61,7 @@ static inline bool number_op(uint8_t op, double a, double b, double *out) { * a HAS in a batch's block beginning if !L.has(k) { ... } whose code only adds to L (a filter: L only grows, so a batch asks * each round as it opens and again, in the rounds' order, at its end). */ enum { PLAN_TEXT = 1, PLAN_JOINED = 2, PLAN_ROW = 4, PLAN_BATCH = 8, PLAN_RECUR = 16, PLAN_GUARD = 32, PLAN_SPREAD = 64, PLAN_FILTER = 128 }; +enum { PURE_REUSE_KEPT = UINT32_MAX }; /* reuse_from at a root whose value later copies of its code take */ /* An item instruction's argument: its list and its field. */ static inline uint32_t list_of(uint32_t arg) { return arg & 0xFFFF; } -- cgit v1.2.3