aboutsummaryrefslogtreecommitdiffstats
path: root/serve/surface.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-05 06:54:21 +0100
committereunhhu <[email protected]>2026-10-05 06:54:21 +0100
commit07791a8b9f9c25e83ef849e1cea431ed25be7553 (patch)
treef6bd1fa52ce5f3dec163a8df5ff43d62372480a0 /serve/surface.h
parentce4be172725d0aca0aa55409d4077bf788374dde (diff)
downloadpure-07791a8b9f9c25e83ef849e1cea431ed25be7553.tar.gz
pure-07791a8b9f9c25e83ef849e1cea431ed25be7553.zip
Keep an event's lists in arrays, flat or at their keys, and read a field by key as one (021)
- pure_list_arrays: an event's list (never shared, journaled or undone) keeps its items in arrays: FLAT in order, or DENSE at their keys when keyed by small whole numbers. A position asked of a DENSE list makes it FLAT; moves past a few times its items, arrays past 64 MiB, or a third change of form make it a tree. Answers are the tree's; the stored bytes stand for its items in the memory budget whatever it keeps them in. - pure_list_add need not say where an item went: a list no index state refers to is not asked. - A LIST_FIND whose index the next ITEM_GET of its list takes at once is joined to it at load (PLAN_JOINED): pure_list_lookup reads the field by key, at the key in a DENSE list. - test-module arrays_equivalence: beside a tree, every step of a random run (adds, inserts, removes, changes, finds, reads, runs, clears) gives the same answers through every form and change of form. - A search (100,000 nodes, 1,000,000 edges, core only): 187 to 126 ms.
Diffstat (limited to 'serve/surface.h')
0 files changed, 0 insertions, 0 deletions