aboutsummaryrefslogtreecommitdiffstats
path: root/core/module-list.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-08 11:28:07 +0100
committereunhhu <[email protected]>2026-10-08 11:28:07 +0100
commitd0558a3a728af8c6c0d8bef2ce7fa55565c518a5 (patch)
treec213462dd867be69457178d0a22571e19519beda /core/module-list.h
parent1b902056b7f2b68277534bcfbfa32d0808dbe05b (diff)
downloadpure-d0558a3a728af8c6c0d8bef2ce7fa55565c518a5.tar.gz
pure-d0558a3a728af8c6c0d8bef2ce7fa55565c518a5.zip
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
Diffstat (limited to 'core/module-list.h')
-rw-r--r--core/module-list.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/module-list.h b/core/module-list.h
index e2007a0..97a6ee1 100644
--- a/core/module-list.h
+++ b/core/module-list.h
@@ -128,6 +128,10 @@ size_t pure_list_seek(const PureList *, unsigned field, PureCell key, bool *foun
* pure_list_seek's but without whether it is key (a slice's bound: a packed
* list then reads its index alone). */
size_t pure_list_bound(const PureList *, unsigned field, PureCell key);
+/* A slice's positions, from the first whose field does not order below low
+ * up to the first not below high (never before from): pure_list_bound's
+ * both, as one (a packed list's whole keys: by its buckets). */
+void pure_list_slice(const PureList *, unsigned field, double low, double high, size_t *from, size_t *to);
/* A stored list keyed by a number and searched by key at least an eighth of
* its items' times since it last changed (4,096 items or more) is packed
* (docs/design/022): its items in arrays, each field's in order, with an