diff options
| author | eunhhu <[email protected]> | 2026-09-28 00:21:09 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-28 00:21:09 +0100 |
| commit | d074deee541ad137e07de8186f0a1e1ffd6761fe (patch) | |
| tree | 538f8c3aeb6a3ccee698b377714e0dc1e966e9ca /docs/research/027-fixed-native-capacity.md | |
| parent | e5ebe8fde5cd048c1998fd1de1b25bc08803733d (diff) | |
| download | pure-d074deee541ad137e07de8186f0a1e1ffd6761fe.tar.gz pure-d074deee541ad137e07de8186f0a1e1ffd6761fe.zip | |
Keep a list's items field by field in its leaves
An item was its own allocation (a share stamp and a cell per field) that
a leaf pointed to, so reading a field of items one after another chased a
pointer to wherever each was made: a count over 100,000 accounts built by
HTTP took 14.5 ms, against 4.6 ms after a restart laid them out in order.
A leaf now holds its items' cells field by field, numbers as binary64
arrays and texts as spans, and pure_list_run gives a leaf's columns to
read item after item.
Copy on write moves to the leaf: a change copies the path including its
leaf, whose texts stay shared; texts carry the share stamp items had, so
one a snapshot may read is retired, not freed. An event's log keeps a
removed item's cells until the event is kept or undone. A node split at
the end of the list leaves the full node full, so lists that grow at
their end (histories, keyed lists filled in key order) fill their leaves.
An account of three numbers and a text now takes 41 bytes in a leaf, not
some 130 across its allocation and the leaf's pointer.
The same count now takes 4.7 ms however the list was built, below
SQLite's 6.1 ms on the same rows. list_trees passes unchanged, and the
app model's tests under ASan and UBSan.
Diffstat (limited to 'docs/research/027-fixed-native-capacity.md')
0 files changed, 0 insertions, 0 deletions
