Repository navigation
test(bench): re-run the #103 U0 ceiling against the real block core - #107
Conversation
U0 measured the update path's architectural ceiling with a hand-written op emitter that kept its rows in an array, and reported beside it a second column — what a keyed core *would* touch — derived by hand because no keyed core existed. U2 built one. This asks it. `block-workload.ts` drives the real `LynxBlockCore` over the same operation ladder `run.mjs` uses, on the same chassis: the same ContextProxy pair, the same fake Element PAPI, the same real main-thread receiver, the same `__OCTANE_LYNX_PROF` accounting. Only the background core differs, which is what makes a count here comparable to the `octane-lynx` column rather than merely adjacent to it. `createHarness` is split so both workloads share that chassis instead of duplicating it; the standing gate's counts are unchanged. Two columns run the same core and differ only in which entry point a state change reaches. `scoped` writes the changed rows' slots by key, as a compiled block program with per-row reactive slots would. `reconcile` hands the whole next list to the keyed reconciler, as the app's own `setRows(next)` does today. Reporting only the first would credit the Block model with a win that belongs to the scoped write: at 10k, `select` is 2 lookups scoped and 10,000 reconciled, against the universal core's 10,042 blueprint visits. The Block model is what makes the scoped write addressable; it is not itself the win. The runner fails if the two columns send different wire, if a cell's counts differ between repetitions, or if the ladder did not paint the tree it should. `swap` is reported without a floor because this slice has no scoped move, so a structural reorder goes through the keyed reconciler either way — the gap is named rather than scored. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
|
Result: No All 12 failures were re-run individually on an idle host and A/B'd against the stack's merge-base Full per-failure table and method: #105 (comment) Generated by Claude Code |
|
`pnpm format:check` fails on the stack for three generated JSON results, which blocks the gate for every branch above them. All three are formatted correctly on `new-lynx`; the unformatted copies came in with this stack: - `stages/results/live-1000.json` and `live-10000.json` were rewritten by `888d9034f` and `88e9db5f0`, first carried by `perf/lynx-bg-replay-attribution` (#102). - `prototype/results/u0-block-core-counts.json` is new in `781e4fca3`, on `test/lynx-u0-block-counts` (#107). Fixed forward here rather than at the source, because both of those branches are published and under review and repairing them in place would rewrite history four and two branches deep. Nothing but whitespace changes: each file reparses to a byte-identical JSON value. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
Review follow-up: the drift break left result non-null with empty diagnostics, so the post-loop guard recorded the drifted last-rep numbers into the JSON payload as an apparently valid cell — quoting exactly the non-invariant the drift check exists to reject. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YHfFsy9CLaRovTFH8pTGyY
Summary
Issue #103's §5 closes U2 with "re-run the U0 harness to verify the real slice".
This is that run.
U0 measured the update path's architectural ceiling with a hand-written op
emitter that kept its rows in an array, and reported beside it a second column —
"keyed block lookups", what a keyed core would touch — derived by hand, because
at the time there was no keyed core to ask. U2 (#105, #106) built one. This asks
it, and replaces the prediction with the counter the core keeps itself.
benchmarks/lynx-table/block-workload.tsdrives the realLynxBlockCoreoverthe same operation ladder
run.mjsuses, on the same chassis: the samecross-wired ContextProxy pair, the same fake Element PAPI, the same real
main-thread receiver, the same
__OCTANE_LYNX_PROFaccounting. Only thebackground core differs. That is what makes a count here comparable to the
octane-lynxcolumn rather than merely adjacent to it.Why
Two columns, because one of them would over-claim alone. Both run the real
core over the real transport, and differ only in which entry point a state change
reaches:
do: write the changed rows' slots by key.
setRows(next)does today: hand the wholenext list to the keyed reconciler.
At 10,000 rows (
blockLookups, the core's own counter):U0's exit gate was
select@10k's reconcile-equivalent count returning to thesemantic lower bound, ~43 against the standing 10,042. The scoped column reports
2 — under the stated bound because the bound included the app's 41 chrome
blueprints and the block core never revisits chrome. Every other op with a floor
lands on it exactly. GO.
And the finding that stops that from being the wrong claim: the
reconcilecolumn reports 10,000 for
select@10k, against the universal core's 10,042blueprint visits. Those are the same number. The Block model, driven the way the
app drives it today, reproduces the cost the universal core already pays. The win
is the scoped write; the Block model is what makes the scoped write addressable
(
Map<key, Block>plus a dense host-id run, so "row 7's class" resolves in onelookup). Port the model without moving the state change off the whole-list path
and #103 buys nothing measurable.
Changes
benchmarks/lynx-table/block-workload.ts— new. The block program mirroringapp/src/App.lynx.tsrxhost-for-host (41 chrome nodes, 7 per row), the ladder,and the two drive modes.
benchmarks/lynx-table/block-counts.mjs— new. Builds it through the same vitepipeline
run.mjsuses and reports per-op counts. Fails if the two columns senddifferent wire, if a cell's counts differ between repetitions, or if the ladder
did not paint the tree it should.
benchmarks/lynx-table/workload.ts—createHarnesssplit intocreateWireChassisplus the universal root, so both workloads share the chassisinstead of duplicating it. No behavior change; see Validation.
benchmarks/lynx-table/prototype/results/u0-block-core-counts.{json,md}— thecommitted record, beside
web-u0-update-ceiling.*: the two halves of one gate.bench:blockscript.Validation
pnpm format:check— viapnpm format:files:checkover every changed pathpnpm typecheck— benchmarks are outside every TS project (typecheck:filesreports "No TypeScript project includes"), which is why
run.mjstype-checksnothing and builds through vite.
block-workload.tswas checked separatelyunder
strictwithtsrx-tscand reports no error of its own.pnpm test— running against this diff; result in a follow-up commentLYNX_TABLE_SCALES=1000 node run.mjs 1givescreate=1 (1000r) update10th=100 (100r) select=2 (225B, 2r) swap=2 (368B, 0r) updateStorm=50c/5000 (5000r) selectStorm=30c/60 (60r),failed: none,matching the committed ratio guards.
runs, with the runner's own zero-drift check at
--reps 2inside each.Two incidental cross-checks that the block program really is the app's program,
rather than something merely similar: at 1,000 rows both cores materialize
7,042 host elements, and a
selectframe is 225 bytes from either. Thoseare read as evidence for the comparison's premise, not claimed as results.
Risk / follow-ups
block program is hand-written — no hooks, no compiler, no component bodies.
This is "what does the architecture cost", never "what does Octane on Lynx cost
today". The
octane-lynxcolumn inrun.mjsremains the second number.them. This bounds the recoverable share of
select@10k— traversal was 48.3% ofthat frame and the count falls 10,042 → 2 — but bounding is not measuring, and
the browser cell is what would measure it.
swapis the gap this names rather than scores. 10,000 in both columns:this slice has no scoped move, so a structural reorder goes through the keyed
reconciler regardless. That is honest LIS behavior, and it is where a
MOVE {firstInstance, count}primitive would earn its keep.bench.mjs. It is an on-demand runner likestages/run.mjs, not a CI gate; adding two more full ladders per scale tobench:allis a separate decision.Provenance
agent-authored)Generated by Claude Code