Skip to content

test(lynx-table): what is left of the program mount is bookkeeping, not mounting - #216

Merged
Huxpro merged 1 commit into
new-lynxfrom
test/lynx-program-journal-ablation
Aug 27, 2026
Merged

Huxpro merged 1 commit into
new-lynxfrom
test/lynx-program-journal-ablation

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

Issue #163, slice C19. Records and a README section only — no packages/ change.

C18 left program mount the largest bucket in the program cell (196.6 ms at
30,000 rows) and the only one still unattributed. C14–C17 split every other
bucket into named sites, but a sampling profiler names frames and mountProgram
is one frame, so splitting it into its loops needs ablation instead — the same
instrument C13 used to price the lookup before C18 removed it.

Why

Order 2 is to keep draining off_boundary bucket by bucket. program mount is
the largest thing left in it, and designing against an unattributed lump is
guessing. This says where the 197 ms actually is, so the next slice aims rather
than guesses.

Changes

  • benchmarks/lynx-table/stages/results/c163-c19-mount-30000.{json,md} — a
    three-arm ladder in one window, n=15, AB/BA rotation.
  • benchmarks/lynx-table/README.md — the section that reads it, including the
    exact build and run commands for the two arms.

Both arms are measurement-only and neither ever lands: each removes
bookkeeping the container needs. Both leave every PAPI call exactly where the
head makes it, so all three arms paint the same 30,000 rows.

  • c19own drops the mount's per-node ownership journal — state.ownedNodes.add
    and state.programNodes.set, per node and per painted keyed range. It also has
    the capture-side root resolution's throw removed, because with programNodes
    empty a program root no longer resolves there; that throw lives in
    first tree capture, not in the bucket this arm reports.
  • c19evt drops the mount's per-site event journal — the loop writing
    {source, binding, listener} into nativeEventMap(state, node). Written as
    for (index < 0) rather than deleted, so the arm differs from the head in a
    body that never runs and in nothing else.

What it found

main-thread script head c19own Δ c19evt Δ
program mount 202.1 69.1 −132.9 178.4 −23.7
event bookkeeping 60.1 55.1 −5.0 15.9 −44.2
first tree capture 26.5 0.0 −26.5 24.8 −1.7
named total 458.1 280.3 −177.8 374.6 −83.5
all frames 481.2 305.7 −175.4 418.6 −62.6

The ownership journal is paid twice. c19own's zero in first tree capture
is not a broken arm: capture's eager half is new Map(state.programNodes), and
an empty map copies for free. So the mount writes every program node into a
Set and a Map one entry at a time, and capture then copies every entry of
the Map again — 133 ms and 26 ms of the same journal.

The event journal is 68 ms, of which nativeEventMap is 38.2 → 0: one Map
allocated per host that carries an event, holding one entry. parseLynxNativeEventProp
(6.3 → 0) resolves a plan constant once per site per row. Token encoding is not
part of it and does not move — 13.4, 13.0, 13.9 ms across the three arms.

What is left of mountProgram after both is about 45 ms: the argument array, the
spread into the compiled create, the returned-length and range checks, and the
walk frames it pushes.

Every number is the record's own median over 15 reps and every Δ the difference
of two of them. Bucket medians are taken independently per rep and do not add to
the named-total median; the section says so rather than leaving it to be noticed.

Validation

  • pnpm format:check
  • pnpm typecheck — n/a to this diff; no TypeScript changed.
  • pnpm test — n/a to this diff; no code changed. The suite was green on
    this branch's parent (PR perf(lynx): read a program's listeners from the run, not by searching for them #214).
  • pnpm format:files over the README and the record JSON — clean.
  • pnpm sync — clean.
  • every table and prose number cross-checked against
    c163-c19-mount-30000.json by script: 55 table claims, 0 mismatches, plus
    the four site medians quoted in prose.

Risk / follow-ups

  • Neither arm licenses deleting anything. The container still has to find every
    physical node it owns, resolve a program id to a node for adoption, and clear
    every listener at teardown. What the numbers license is asking whether main has
    to remember it per node, when the mount already holds a program's ids and its
    created nodes as two arrays in the same order.
  • The arms' whole-script deltas are upper bounds on what a reduction would
    deliver: an empty journal also makes everything downstream of it cheaper. The
    per-bucket rows are the attribution; the totals are not.
  • Oracle clause 1 stays unmet and clause 4 unmeasured. This slice
    measures; it moves neither oracle and changes no shipped behavior.

Provenance

  • An agent produced this diff (agent-authored)

Generated by Claude Code

…not mounting

C18 left `program mount` the largest bucket in the program cell and the only
one still unattributed. C14-C17 split every other bucket into named sites, but
a sampling profiler names frames and `mountProgram` is one frame, so splitting
it needs ablation instead — the same instrument C13 used to price the lookup
before C18 removed it.

Two measurement-only arms, built into tagged dists from one tree and run beside
the shipping head in one window, n=15, AB/BA rotation. Neither ever lands:
each removes bookkeeping the container needs. Both leave every PAPI call where
the head makes it, so all three arms paint the same 30,000 rows.

- `c19own` drops the mount's per-node ownership journal — `ownedNodes.add` and
  `programNodes.set`, per node and per painted keyed range. `program mount`
  202.1 -> 69.1 (-132.9), and `first tree capture` 26.5 -> 0.0: capture's eager
  half is `new Map(state.programNodes)`, and an empty map copies for free. So
  the same journal is paid twice, once writing and once copying.
- `c19evt` drops the mount's per-site event journal. `event bookkeeping`
  60.1 -> 15.9 (-44.2), of which `nativeEventMap` is 38.2 -> 0 — one Map
  allocated per host carrying an event, holding one entry — plus 23.7 more
  inside the mount for the loop and its frozen records.

What remains of `mountProgram` after both is about 45 ms: the argument array,
the spread into the compiled create, the returned-length and range checks, and
the walk frames. The other 200 is main remembering what it mounted.

Neither arm licenses deleting anything. The container still has to find every
physical node it owns, resolve a program id to a node for adoption, and clear
every listener at teardown. What the numbers license is asking whether main has
to remember it per node, when the mount already holds a program's ids and its
created nodes as two arrays in the same order.

Records: `stages/results/c163-c19-mount-30000.{json,md}`. Every number in the
README section is the record's own median and every delta the difference of
two of them; bucket medians are taken independently per rep and do not add to
the named total, which the section says rather than leaving to be noticed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
@Huxpro
Huxpro force-pushed the test/lynx-program-journal-ablation branch from 9879459 to e05cf47 Compare August 27, 2026 00:09
@Huxpro
Huxpro changed the base branch from feat/lynx-program-announcement-run to new-lynx August 27, 2026 18:42
@Huxpro
Huxpro marked this pull request as ready for review August 27, 2026 18:42
@Huxpro
Huxpro merged commit 146ae50 into new-lynx Aug 27, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant