Compile-Time Performance And Incremental Builds
This page documents the bounded production evidence for compile-time
performance and incremental builds in the native performance roadmap. It covers
dependency graph hashes, incremental cache invalidation, cache pruning,
corruption recovery, reproducibility, parallel job limits, tiered compiler
modes, bounded single-job gates, self-profile metrics, representative
workloads, and release regression budgets.
Run the bounded gates with:
make compiler-query-engine-check
make compile-time-budget-check
make incremental-compiler-check
incremental-compiler-check depends on compiler-query-engine-check. These
gates do not run the full release or self-host matrix. They validate the
source-owned compile-time and query-engine evidence listed below.
Evidence Files
compile-time/schema.tsv;compile-time/dependency-stages.tsv;compile-time/cache-policy.tsv;compile-time/tier-modes.tsv;compile-time/job-limits.tsv;compile-time/profile-metrics.tsv;compile-time/verification-cases.tsv;compile-time/fixtures/valid-native-compile-time.json;release/native-compile-dependency-graph.tsv;release/native-compile-cache-report.tsv;release/native-compile-job-report.tsv;release/native-compile-tier-report.tsv;release/native-compile-self-profile.tsv;release/native-compile-regression-report.tsv;release/native-compile-time-release-notes.html;perf/native-compile-time-benchmarks.tsv;compat/native-compile-time-contract.tsv;tools/native-compile-time-check.py.compiler-query/query-kinds.tsv;compiler-query/provider-registry.tsv;compiler-query/output-schemas.tsv;compiler-query/incremental-scenarios.tsv;release/compiler-query-graph-report.tsv;release/compiler-query-cache-miss-report.tsv;tools/compiler-query-engine-check.py.
Dependency Graph
The dependency graph records stable content hashes for parse, type, effect,
monomorphization, native IR, optimization, codegen, link, and post-link stages.
Cache keys are derived from content and configuration, not file modification
times.
The verifier rejects malformed graph evidence:
NATIVE_COMPILE_GRAPH_HASH
Incremental Cache
Incremental cache rows record cache keys, invalidation policy, pruning,
corruption recovery, and reproducibility checks. Cache hits must reproduce the
expected output hash before they are accepted.
The query engine adds stable query keys and red/green dependency status for
source files, token streams, parsed forms, module signatures, imports,
type/effect results, HIR, MIR, native IR, object output, diagnostics, and
documentation extraction. Inspect query reuse with
release/compiler-query-graph-report.tsv; inspect recomputation reasons with
release/compiler-query-cache-miss-report.tsv.
The verifier rejects:
NATIVE_COMPILE_CACHE
NATIVE_COMPILE_CACHE_CORRUPTION
NATIVE_COMPILE_REPRODUCIBILITY
Job Limits And Tiered Modes
Every compile-time gate has bounded single-job execution. Higher job counts are
explicitly budgeted by stage, and configured jobs cannot exceed the recorded
stage limit.
The verifier rejects:
NATIVE_COMPILE_JOB_LIMIT
NATIVE_COMPILE_SINGLE_JOB
Tiered modes are:
fast-check;fast-codegen;optimized-release;size-release;freestanding-release;audited-release.
Self-Profiling And Budgets
Self-profile rows record elapsed time, peak RSS, query count, pass time, cache
hit rate, generated code size, and optimizer worklist growth for representative
workloads:
- language;
- libraries;
- Index;
- Kukulkan;
- embedded;
- compiler self-build;
- incremental touch rebuild.
The verifier rejects compile-time or RSS regressions:
NATIVE_COMPILE_BUDGET
Release budget rows are published in
release/native-compile-regression-report.tsv. Release notes are published in
release/native-compile-time-release-notes.html.
What This Does Not Overpromise
This page closes native performance Milestone 9 for bounded compile-time and
incremental-build evidence. It does not run the heavy self-host gate or final
release matrix; those remain owned by later roadmap milestones.