aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-28 05:14:16 +0100
committereunhhu <[email protected]>2026-09-28 05:14:16 +0100
commit468ddde46c7904ae14e29444351a738de73f8864 (patch)
tree3367ff0137ef609204e67c67c54198fd19ba1a0c /benchmarks
parent15f0114d6a7da0a4f63028db12cac62c5f9cc922 (diff)
downloadpure-468ddde46c7904ae14e29444351a738de73f8864.tar.gz
pure-468ddde46c7904ae14e29444351a738de73f8864.zip
Read only the keys a test allows, and count distinct values
A filter, a fold or a walk's where (a test at the start of its block and a jump to its end when it fails) that ANDs comparisons of a keyed list's key with values reading no item gets a range at load (PureRange: a lower bound GT or GE, an upper LT or LE, EQ both). When it runs, the bounds are found once and looked up by key, and only the leaves between the two positions are read: O(log n + k) where it read every item. A filter leaves the items out of range out anyway, so it always may; a fold or a walk only when the rest of its test and its value cannot fault (no division, sum or product that may overflow, key or item that may be missing), since the items it skips would have run them; a walk's bounds must also read no state, local or list its block writes, as the where reads them anew for every item. A bound that faults leaves the test to run for every item, as written. A fold of kind 5 (distinct) counts the different values its included items give (-0 as 0), with a set per fold; it runs a leaf at a time and is never shaped. max, min and first alone fault over no item. ranges checks, against the same module reading every item, over 60 lists of up to 400 keyed items and 3,600 views: a count between two bounds, a sum between a lower and an upper bound with another condition, first equal to a key, min with the bound on the right, a count whose test may fault (no range), a filtered table in bounds, 359 walks changing and removing the items in bounds, and a walk whose body moves its bound (no range). lane_folds now makes distinct folds too.
Diffstat (limited to 'benchmarks')
0 files changed, 0 insertions, 0 deletions