ReviewOS

home-lang/home

bench(ts): cover destructuring and object rest spread

#453
Closed chris opened this 8 days ago ·
8 days ago

Extend the shared frontend suite with common object/tuple destructuring, nested binding projection, defaults, object rest, and spread result checking. Track under #416.

The corpus must be deterministic and identical for Home, JavaScript tsc 6.0.3, and native TypeScript/tsgo 7.0.2. Freeze its hash after all compilers accept it silently and reject meaningful negative controls. Do not weaken expected types to accommodate a compiler defect; fix any exposed correctness gap before measuring. Capture the baseline before optimization, preserve all timing samples, and change only general compiler paths. Verify full checker tests and publish results in README plus detailed docs using small conventional commits on main.

8 days ago

Corpus and automatic negative controls landed before timing. Accepted source: 128 families, 4,032 lines, 122,226 bytes; SHA-256 17049403e0a09a25e1f5ca78d730a7a683e78fd375681aaf1af92c460bbde673. All three compilers accept the source silently and reject all five inferred-binding controls with exactly four TS2322 diagnostics and one TS2339. The controls run automatically in a temporary project copy before benchmark timing. All 17 regenerated workloads pass the three-compiler positive gate.

8 days ago

Initial frozen baseline 20260827T160641Z, five interleaved runs after three warmups: destructuring Home 97.6 ± 0.4 ms, native TS 7.0.2 45.3 ± 2.1 ms, tsc 6.0.3 135.2 ± 2.3 ms (2.15× Home loss). Type predicates also record a narrow loss in this snapshot: Home 71.4 ± 8.5 ms vs tsgo 68.2 ± 0.4 ms. All remaining 15 workloads win. All positive and automatic negative gates passed. Next: profile unchanged destructuring inputs and reduce general repeated work.

8 days ago

General recovery-range caching is implemented in 06baa99 (refs #416 and #453). Profiling the unchanged workload found repeated raw source containment scans for recovery candidates. Ranges are now materialized lazily once per queried name and cleared with source facts; exhaustive position-pair equivalence tests preserve the original scanner semantics. Full checker suite passes (4,194 tests), ReleaseFast builds, and all five destructuring negative controls pass. A preliminary 20-sample interleaved check reports Home 41.5 ± 1.2 ms vs native TS 7.0.2 51.1 ± 1.5 ms; the 1,024-family diagnostic scale drops from 34.44 s to 2.74 s. These are preliminary/profile measurements, not the published result. Running the complete 17-workload, 30-sample suite now; type predicates remains a narrow margin and all samples will be retained.

8 days ago

Completed and published in cda5125 after compiler optimization 06baa99. Authoritative snapshot 20260827T162037Z: 30 interleaved samples after 3 warmups, JavaScript tsc 6.0.3 versus native TypeScript/tsgo 7.0.2 versus Home. All 17 workloads record a lower Home mean. Destructuring: Home 47.8 ± 14.0 ms, native TS 63.4 ± 25.2 ms, tsc 186.2 ± 75.6 ms (1.32× mean win). Type predicates remains narrow at 78.1 ± 2.3 ms versus native TS 82.3 ± 7.4 ms (1.05×). Variance is explicitly documented; this is not a universal benchmark-leadership claim. Verified all 1,530 timed samples exited successfully and README/full docs exactly match the raw results. Frozen hashes unchanged; five automatic negative controls, 4,194 checker tests, and ReleaseFast build pass. Earlier losing baseline retained. README and docs/docs/TS_PERFORMANCE.md include methodology, historical baseline, source hash, profiling explanation, correctness gates, and full uncertainty. Small commits pushed directly to main as Chris Breuer without coauthors.

Sign in to comment on this issue.