<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pure/research/experiments/009-runtime-drafts/bench.c, branch master</title>
<subtitle>Verified execution runtime unifying state, persistence, and replication.
</subtitle>
<id>http://git.yeowoo.org/pure/atom?h=master</id>
<link rel='self' href='http://git.yeowoo.org/pure/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/'/>
<updated>2026-09-25T08:34:34Z</updated>
<entry>
<title>Let the runtime own working versions as drafts</title>
<updated>2026-09-25T08:34:34Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-09-25T08:34:34Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=65386f68fb53e5a9a20a284b06afd872172c30eb'/>
<id>urn:sha1:65386f68fb53e5a9a20a284b06afd872172c30eb</id>
<content type='text'>
state.h gives any app a runtime-owned working version of a stored value on
the tree store. A draft shares unchanged extents with the stored version,
edits in memory by path copying, lends ordered extents without copying, and
commits only its new nodes when the key is still at its base revision. A
failed commit changes neither the draft nor the store; a draft whose file was
replaced by compaction copies its stored extents on commit. Unreachable
arena nodes are reclaimed once they outweigh max(reachable, 32 KiB).

Typing into the middle of a 1 MiB document and saving each character peaked
at about 1,660 KiB RSS with a draft against about 4,480 KiB for an app copy
compared with storage on save; saves were only 1-2 ms faster. This corrects
073, which had attributed the TUI's remaining 8 ms to that comparison.
Drafts are not yet charged to the runtime budget or visible to .pure
definitions.

</content>
</entry>
</feed>
