Skip to content

perf(startup): file runs reuse the stdlib typecheck-env cache (perf plan Phase 3) - #342

Merged
Ch4s3 merged 3 commits into
mainfrom
claude/jit-repl-interpreted-perf-68373c
Aug 25, 2026
Merged

perf(startup): file runs reuse the stdlib typecheck-env cache (perf plan Phase 3)#342
Ch4s3 merged 3 commits into
mainfrom
claude/jit-repl-interpreted-perf-68373c

Conversation

@Ch4s3

@Ch4s3 Ch4s3 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Phase 3 of docs/superpowers/plans/2026-08-23-interpreter-and-repl-jit-performance.md (sequencing Gate G3, Lane P).

march file.march (and --compile, which shares the typecheck site) no longer re-typechecks all 116 stdlib modules per run: check_module_full seeds from the existing get_stdlib_tc_env CLI cache (own namespace, keyed by compiler BLAKE3 identity + stdlib content hash — deliberately NOT the REPL's cache file, whose env is built by a different, error-tolerant fold). Startup: ~1.0-1.2 s cold → ~0.28-0.36 s warm.

Guardrails, from review:

  • a user module shadowing a stdlib module bypasses the cache entirely (no read, no write) and takes the pre-existing from-scratch check — the seeded env would be degraded; regression test proves the pre-fix cache pollution (fail-first against the unfixed binary, independently reproduced by the re-reviewer)
  • new tcenv_cli_cache suite pins cold/warm --emit-llvm IR byte-identity under an isolated HOME
  • march warm-cache now warms this cache too

Suites: compiler 936 / eval 273 / codegen 589 — all green at head; user-file diagnostics byte-identical cold vs warm vs pre-change binary; stdlib-heavy compiled IR byte-identical across all three.

@Ch4s3
Ch4s3 merged commit c4b41bd into main Aug 25, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant