ReviewOS

home-lang/home

perf(ts): strengthen checked-JavaScript benchmark margin

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

Evidence

The authoritative 16-workload snapshot 20260827T154256Z (30 round-robin interleaved runs after 3 warmups) records a checked-JavaScript mean loss:

  • tsc 6.0.3: 219.8 ± 20.4 ms
  • native TypeScript/tsgo 7.0.2: 56.5 ± 2.7 ms
  • Home: 58.4 ± 33.3 ms

Home has a 52.1 ms median, but one 234.3 ms sample raises the unfiltered mean above tsgo. The run must remain documented rather than discarded. The other 15 workloads, including the new null-safe-access workload, are Home mean wins.

Work

  • Profile the existing frozen checkjs_jsdoc corpus and scaled same-shape copies.
  • Improve only general checker/parser behavior; do not alter the corpus or discard timing samples.
  • Preserve the full checker correctness gate and valid/invalid corpus gates.
  • Publish a fresh full 30-run suite and retain the observed losing snapshot in the historical record.

Follow-up to #448, tracked under #416.

8 days ago

The observed losing snapshot is now durably published in ad94381 (README plus docs/docs/TS_PERFORMANCE.md). Starting the next profiling/optimization cycle from that exact frozen checkjs_jsdoc corpus; no samples or input features will be removed.

8 days ago

Completed on main:

  • 332e228 adds a general nested function-span index for first-time source-position ownership queries, preserving original-scan fallback for crossing ranges/allocation failure and original NodeId tie-breaking.
  • bc3eeaf publishes the new full-suite snapshot while retaining the previous losing JSDoc result in the historical record.

Validation:

  • Full ts_checker suite: 4,193/4,193.
  • New regression compares indexed vs original-scan answers at every source position across nested functions/arrows/function expressions and verifies source-state reset.
  • Valid checked-JavaScript corpus is silent on all three compilers; preserved string-to-number variant is rejected by all with TS2322.
  • Frozen source SHA-256 remains 898573fc0f2567653fef3edb3675d768f825abd80b83e708e7d57d29049c03ec.

Authoritative 30-run snapshot 20260827T155812Z:

  • tsc 6.0.3: 196.6 ± 4.1 ms
  • native TypeScript/tsgo 7.0.2: 51.7 ± 1.1 ms
  • Home: 40.1 ± 0.9 ms (1.29× faster than the fastest competitor)
  • Full suite: 16/16 Home mean wins.

The 2,048-family same-shape profile copy improves from 4.55 s to 2.31 s. No corpus features or timing samples were removed.

Sign in to comment on this issue.