ReviewOS

home-lang/home

perf(ts): derive complete owned root facts for require receiver lookup

#881
Open chris opened this 8 days ago ·
8 days ago

Follow-up to #854 and #416. The current byte-identical bb4c00d native profile (compiler4b4060e05) maps displayed PCs to the root-statement loop in memberAccessReceiverIsRequireAssignmentBinding. The full paused matrix retains all3000 samples; checked JS is1.88x behind the fastest admitted competitor. This is an investigation lead, not a CPU-share or speedup claim.

Implement an algorithmic replacement using complete, declaration-owned HIR facts collected coherently with existing declaration processing. Preserve the scalar predicate for every matching import-equals and simple variable require initializer, including duplicate names, declarations after a use, exports, nested shadowing behavior, virtual sections and synthetic/source-less HIR. The existing JSDoc prefix cache stores only the first variable and excludes imports, so it is not sufficient as-is. No coarse presence cache revival, benchmark/library/filename predicates, new semantic caps, layout tuning, any erasure, skipped bodies or filtered diagnostics.

Acceptance: permanent exact scalar-oracle tests across all root/section/name queries, forward/duplicate/escaped identifier/import/export controls, HIR growth and source/checker reuse, every allocation-failure stage with cleanup and safe scalar fallback. Keep ownership separate from foreign declaration handles. Full unfiltered checker/Program/driver/CLI/entrypoint gates, actual strict CLI admission, all20 workloads and unchanged Zod diagnostic comparison must pass. Freeze the exact parent and a full official/scaling/independent risk protocol before any timing; retain every observation and reject confirmed regression. Publish accepted or rejected outcomes with checksum raw evidence, README table/link, issue-linked conventional Chris-only main commits and no coauthors. Universal benchmark/platform leadership remains #416 and is not claimed by this issue.

8 days ago

Starting from the actual current main parent e00470f, after preserving the newer declaration-only CLI/config cleanup commit by clean fast-forward. The checker source is unchanged from the profiled4b image, but CLI/config code changed, so the new exact-parent baseline will be built and frozen separately; oldbb4 timings/profile are not relabeled as this newer image. A separate-prefix Zig2163 ReleaseFast/stripped/no-JSC build is running under unchanged600s/3840MB guard, preserving installed and retained binaries. No candidate compiler edit or new timing yet. Scalar preservation must include the predicate’s readonly/CommonJS/function-expando consumers, all duplicates and imports, virtual sections, source-less HIR, growth/reuse and every allocation failure.

8 days ago

Exact new-main parent e00470f is frozen as native b251b7273cd1e659946d073fa905ec5c8c690686c26c63a6fb1b3bf13f9d71bb (baseline build guard exit0,2849MB peak,32% host low-water). Retained/installed bb4 images are unchanged. Candidate reuses existing ordered LocalValueContainerIndex require buckets rather than adding a coarse presence cache; includes every actual root HIR require/import declaration, no text-hint absence assumption, no anchor cutoff or cross-section fallback for the receiver predicate. Shared consumers validate HIR owner/node count and statement identity/section mode before reuse; scalar original remains the OOM oracle. Added systematic cold/warm scalar and allocation-failure controls. First unfiltered checker run:4572 passed,0 skipped,1 failed; candidate is unadopted. Same exact test binary replay is queued only to preserve a complete failure log, not benchmark timing. No source push, weaker expectation or speed claim.

8 days ago

First checker failure identified and retained: the newly added source-hint fixture shortened source and invalidated literal spans; all existing4568 checks passed. Fixed the fixture by preserving spans, added source pointer/length coherence for cached borrowed specifiers, and strengthened HIR-growth control with a real newly appended require binding. No expectation relaxed. Revised patch c460399 is frozen; full unfiltered checker/Program/driver/CLI/entrypoint batch29213 is live with complete logs. Before any timing, protocol is fixed: all20 official plus512/8192 unchanged JS scales;10-pair screens and independent30 pairs for all22 workloads. Adoption requires all semantic/admission gates, no added unchanged-Zod diagnostics vs exacte004 parent, strictly positive officialJS independent paired-mean95% interval and no wholly negative interval anywhere.20000 paired bootstrap resamples,seed881; no filtering, reruns, layout tuning or weaker bodies/negatives. Candidate remains unadopted.

8 days ago

Revised candidate is unadopted and remains only in the task worktree. Exact patch c460399 is frozen, with all22 independent performance workloads and adoption rules recorded before timing. Source ownership, borrowed source pointer/length, HIR growth and statement/section coherence are now checked for all shared index consumers; original scalar receiver scanner is retained. Full source batch29213 is still compiling; do not infer correctness or speed from its live status. All raw first-failure logs/binary/patch, frozen parent b251b72, prior measured bb4 images and source are preserved. No samples discarded or benchmark timings started; no candidate source pushed before complete qualification.

8 days ago

Authoritative update: corrected candidate full checker passes all4573 tests, zero skips, exit0; complete program phase is now running in original batch29213. Patch remains c460399 unchanged. The initial failed fixture/binary/log/patch remains retained and no old expectation was weakened. Candidate is still unadopted, with driver/CLI/entrypoint, real-CLI/protocol/library admission and the predeclared all22-workload performance decision pending. No benchmark timing or candidate push yet.

8 days ago

Combined source-gate batch29213 terminated with actual guardexit124 during Program compilation; it is retained as failure evidence, not treated as an observation timeout or success. Checker4573/4573 completedexit0 is preserved and not repeated. Remaining four unchanged, unfiltered module suites now run sequentially with individual normal600s/3840MB guards via controller18517; no guard limit raised and no test subset selected. Candidate build/admission tools are prepared but cannot run until all five source gates pass. Exact new-parent library comparison will retain complete TS/HM identities and reject unclassified or added diagnostics; fullZod is still unadmitted/untimed. No benchmark timing started or candidate source pushed.

8 days ago

Authoritative progress: checker4573/4573, Program265/265 and driver201/201 all pass unfiltered; Program guard peak3129MB/host26%, driver2785MB/host29%. CLI/entrypoint remain in original remaining-controller18517. Qualification-controller2986 waits for all five successful gates before separate-prefix candidate build and complete294 extended/180 protocol/unchanged parent-vs-candidate Zod/16 scale admissions. No timing or source adoption yet. Paired runner and independent verifier are prepared for all22 fixed workloads, retaining all warmups/pairs/diagnostics and stopping incomplete or repeated phases. Seven explicitly simulated verifier tests pass (constant-difference math, missing pair/warmup, duplicate order, failed exit, NaN and changed provenance); these are isolated temporary tests, not benchmark evidence. Original failure/timeout logs and all source/raw/binaries are preserved.

8 days ago

CLI source gate now passes all80 tests, zero filtering, guardexit0 with2774MB peak and29% host low-water. Checker4573, Program265 and driver201 remaincomplete passes. Only entrypoint remains in originalcontroller18517; qualification-controller2986 is live and waits for all five gates before exact frozen candidate build and complete actualCLI/protocol/scaled/library controls. Source patch c460399 is unchanged; parent/retained images are preserved. Shared lock waited for unrelatedJSC Home build, which finished without interference. No performance timings, candidate adoption or source push yet.

8 days ago

All five full source gates now pass on unchanged c460399:4573 checker,265 Program,201 driver,80 CLI,47 entrypoint. Original remaining-controller18517 completedexit0; no successfulchecker repeat. Entrypoint guard3062MB peak/30% host low-water. Qualification-controller2986 has started separate-prefix candidate build under unchanged600s/3840MB guard, preserving parent b251b72 and prior measured bb4 binaries. Complete extended/protocol/scaled controls and exact unchanged-Zod parent/candidate delta follow automatically only after successful build. No benchmark timing, candidate adoption or source push yet; original fixture failure and combined600s timeout remain retained.

8 days ago

All source/build/admission qualification completedexit0. Candidate native7d7d4ed2 is frozen from exacte004 parent+patchc4603997; installed/retained images unchanged.294 complete extended admissions,180 six-image protocol5 records and16 TS6/TS7/parent/candidate512/8192 scale controls pass. Unchanged fullZod parent andcandidate each retain exactly235 TS/HM diagnostic identities:0added/0removed; still unadmitted and untimed. Source/build/admission controller2986 is terminalsuccess. Starting the fixed880-pair protocol: all22 workloads,10-pair screens then30-pair independent confirmations, every phase under unchanged600s/3840MB guard, no repeats/filtering. Adoption remains withheld until official checked-JS independent gain and no wholly negative interval across all22; zero-spanning is inconclusive, not equivalence.

8 days ago

Published e7ed4c0 to origin/main as Chris Breuer, no coauthors. Candidate is unqualified and was restored via exact task-only reverse patch; no compiler code adopted. All5166 source tests,294 extended/180 protocol/16 scale controls passed; unchangedZod235 identities had0added/0removed. Official checked-JS independent CI[-0.142,+4.473]ms spanszero, so frozen primarygain rule failed. All22 screens and21 independent phases verified850 pairs; final8192 guard124 retains27 complete valid pairs andone empty timerfile, not a completed confirmation. Total877 complete pairs/264 warmups retained, no repeats/discards/limit changes/layout tuning. Startup screenloss retained despite independentstartupgain; scaling positives do not override missingprimarygain. Full1447-payload archive checksums/rawbytes and all43 complete docs rows/four README numeric comparisons verified; final row explicitlyincomplete. Issue staysopen for a genuinely different algorithm, not repeat-to-win.

8 days ago

Post-rejection task-only cleanup completed: deleted only the generated .zig-cache in this task worktree,312063266 bytes. All82800 protected source/raw/image hashes are unchanged. Both frozen b251/7d7d images, older bb4 binaries, all877 pairs/264 warmups/empty interrupted raw, failed revisions and publication archives are preserved. Shared/global caches and unrelated jobs/data untouched. Cache is rebuildable. Main worktree source is clean after e7ed4c0; no rejected compiler code remains active.

Sign in to comment on this issue.