From ad1a8f4bc4c363e7c6e7a89e14fdab62cb914a82 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 29 Oct 2026 18:54:12 -0300 Subject: docs/next-daemon.md: phase 2's gates and measurements Co-Authored-By: Claude Opus 5.5 --- docs/next-daemon.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'docs') diff --git a/docs/next-daemon.md b/docs/next-daemon.md index 7da2804f..fc9bdf64 100644 --- a/docs/next-daemon.md +++ b/docs/next-daemon.md @@ -1431,3 +1431,40 @@ What proved wrong or missing in the design: decoded as it arrives (the join can stream it; decoding as it arrives needs a reader over a stream, not a slice). Native byte order: every host pardes runs on is little-endian. + +The gates on the rebased line (on main vvmuwntp). `zig build replay +-Dreplay-seeds=50`, now with `--dump`: the 110 scripts (129 sessions, +32,373 replica digests) and 50 monkey seeds of 70 steps (38,022 digests), +no divergence, and every session's dump at its end loaded to its digest +(all 179, field by field) and dumped again byte for byte (13.9 MB and 5.4 +MB of dumps). The 110 snapshots pass with five goldens moved (above). +unit-test tty passes; unit-test gui fails only phase 1's two known tests; +test/fs.py and test/daemon.py (20 cycles) pass. The cross-build check is +walk.zig's test of two hand-written versions of a struct (a field added, +one removed, one renamed, enums renumbered, a width changed, a pane whose +required field changed kind left out), both ways, and dump.zig's of a real +session read by name. + +Measured (ReleaseFast, the base binaries from before the rework against +this line, interleaved A B A ... A on the perf cores, medians, the base's +own spread as the A/A): the perf harness's core cells 0.91-1.01 of base +(p90 0.95-1.08) at an A/A of 5-109%. A session of 16 small files, a +100 MB file and a terminal with `seq 1 3000000` of scrollback, through +9P in a real pty: + +| | base | new | A/A | +|---|---|---|---| +| Dump, the big file clean | 9.5 ms, 0.2 MB | 83 ms, 105 MB | 19% | +| Restore of it | 71 ms | 98 ms | 10% | +| Dump, the big file unsaved | 507 ms, 140 MB | 185 ms, 210 MB | 8% | +| Restore of it | 1841 ms | 316 ms | 2% | +| a closed pane kept: the terminal | 122 ms | 128 ms | 49% | +| the 100 MB file | 438 ms | 84 ms | 4% | +| a small file | 10.5 ms | 18 ms | 23% | + +A clean file's text is in the dump now (what makes it complete), and an +unsaved one's undo (the 100 MB file's one edit keeps the text before it); +binary, not base64 in ZON, so the rest is faster. A small pane's close +pays its type table (a pane's dump is self-describing) and the generic +walk: 8 ms. The live keystroke cells were not run (perf rule: `--live` +only for a change to terminal output); a dump is off the hot path. -- cgit v1.3