Skip to content

feat(bench): issue-58 L0 — Lynx IR spec and direct-emission prototype with measured evidence - #59

Merged
Huxpro merged 2 commits into
new-lynxfrom
claude/octane-issue-58-arch-j4ya6v
Aug 19, 2026
Merged

Huxpro merged 2 commits into
new-lynxfrom
claude/octane-issue-58-arch-j4ya6v

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

L0 of #58 (Lynx-specialized compiler + renderer roadmap): the representation spec, the cost model, and the measured evidence for the L0 exit gate — a direct-emission prototype cell for the lynx-table fixture, driven end-to-end through the existing web harnesses.

  • docs/lynx-specialized-target-l0.md — the Lynx IR spec (static structure, create functions, slot table, typed delta opcodes, adoption identity, directive lowering), the cost model, the fresh-core-vs-extraction recommendation (extract a host-neutral hook kernel from universal-core.ts, per the two-renderer escape clause), and the recorded GO verdict.
  • benchmarks/lynx-table/prototype/ — the octane-direct cell: a hand-written rendition of what a target: 'lynx' backend would emit for the fixture (straight-line PAPI create functions + slot-delta applier on the main thread; a state-owner background stub emitting typed deltas over callLepusMethod), assembled into a JSON web bundle that shares the octane cell's pageConfig and app.css byte-for-byte. Includes a functional-parity smoke for every benchmark op, an FCP A/B runner, a binary-bundle section reader, and the committed session records under prototype/results/.
  • web/run-web.mjs — registers octane-direct as an opt-in cell behind the byte-identical driver.

L0 exit-gate verdict: GO

Measurement session (4× Xeon 2.10GHz, Chromium 141, quiet-host protocol, fresh page per sample, n=5, AB/BA alternation; medians, same-window ratios):

FCP@10k mount-create ladder (prototype/results/fcp-10000.md):

cell median fcp ms min–max
octane (universal path) 1590.9 1541.4–1636.2
octane-direct 915.0 886.2–947.9

0.575×, −675.9 ms — against a path whose directly observed plan_interpretation is only 111.5 ms. The win is the whole interpret → record graph → command batch → prepare → generic apply pipeline around the identical PAPI calls; PAPI creation itself (476.6 ms same-session) and layout/flush persist in both cells and are the engine-intrinsic remainder.

Per-op wall clock @10k (prototype/results/web-l0-session.md, ×vs vue-vdom):

op octane octane-direct vue-vdom vue-vapor react
create 1082 (0.80×) 862 (0.64×) 1350 1407 (1.04×) 1107 (0.82×)
update10th 146 (1.34×) 82 (0.75×) 109 70 (0.64×) 156 (1.43×)
select 75 (1.15×) 44 (0.67×) 65 35 (0.53×) 94 (1.44×)
updateStorm 539 (0.32×) 572 (0.34×) 1668 808 (0.48×) 3766 (2.26×)
selectStorm 103 (0.15×) 91 (0.13×) 708 129 (0.18×) 1851 (2.62×)

Storms are at parity — the universal path's per-tick cost is already floored by flush/layout, which bounds expectations: the specialized path's wins are first screen, bulk creates, and point updates. Same-session stage attribution of the current path (prototype/results/stages-10000-l0-session.md): create@10k papi_element_creation 582.9 + mt_apply_other 290.3 + bg_replay 138.7 of 1165.9 ms raw.

Validation

  • pnpm format:check
  • pnpm typecheck
  • pnpm test
  • targeted tests: prototype/smoke.mjs functional parity at 1k and 10k (create/append/update-10th/select/remove/swap/clear/both storms); stages/run.mjs --smoke on the unmodified harness; full stages/run.mjs --reps 5 --rows 10000 reportable run; pnpm sync clean.

Docs + benchmark-only change: no runtime/compiler package is touched (packages/** unchanged), so repo-wide typecheck/test were deliberately not run for this diff; format:check and sync pass repo-wide.

Risk / follow-ups

  • The prototype is an architecture floor, not an achievable-Octane number — its background thread does no hook/reconciler work (bounded by the measured bg_replay 138.7 ms); the claim boundary is spelled out in prototype/README.md and the spec.
  • Follow-up issues filed under Roadmap: replace the universal-renderer target for Lynx with a Lynx-specialized compiler and renderer #58: L1 target: 'lynx' compiler backend, L2 background core + slot-delta protocol (kernel-extraction spike first), L3 main-thread applier + first-screen codegen; deferred capability details (directive lowering beyond the fixture, native .lynx.bundle template sections, lane-scheduler batching) are listed there.

Provenance

  • An agent produced this diff (agent-authored)

@Huxpro
Huxpro changed the base branch from main to new-lynx August 19, 2026 17:12
@Huxpro
Huxpro marked this pull request as ready for review August 19, 2026 17:12
@Huxpro
Huxpro merged commit e2499a6 into new-lynx Aug 19, 2026
20 of 21 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.

2 participants