perf(startup): file runs reuse the stdlib typecheck-env cache (perf plan Phase 3) - #342
Merged
Merged
Conversation
… bypass) so emitted core AST is byte-stable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_fullseeds from the existingget_stdlib_tc_envCLI 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:
tcenv_cli_cachesuite pins cold/warm--emit-llvmIR byte-identity under an isolated HOMEmarch warm-cachenow warms this cache tooSuites: 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.