Skip to content

perf(build): accelerate AIR lowering and reuse Go cache - #474

Merged
akonwi merged 2 commits into
mainfrom
perf.air-method-lookup
Sep 1, 2026
Merged

perf(build): accelerate AIR lowering and reuse Go cache#474
akonwi merged 2 commits into
mainfrom
perf.air-method-lookup

Conversation

@akonwi

@akonwi akonwi commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • cache cross-module required, inherent, and trait method lookups by canonical struct identity
  • canonically order AIR discovery and generated Go module metadata so unchanged builds produce byte-stable workspaces
  • restart generated temporary names per function and global initializer so unrelated declaration ordering does not rewrite output
  • keep method caches scoped to single-root lowering to avoid mixing independent module graphs

Performance

Warm local builds:

Project Before After
Tinear ~10.25s ~3.12s
Cooper dashboard (determinism pass) ~2.27s ~0.99s

For Tinear, AIR lowering dropped from ~6.18s to ~2.05s. Once generated output became stable, the Go stage dropped from ~3.05s to ~0.35s.

Two identical Tinear builds changed 0/79 generated Go files and no generated workspace files, compared with 62/79 changed Go files before canonicalization.

Validation

  • go test ./... -count=1
  • go test -race ./... -count=1
  • gopls check on changed Go files
  • git diff --check
  • Tinear and Cooper warm-build profiling

akonwi added 2 commits August 31, 2026 22:55
Canonically order AIR discovery and generated Go module metadata so identical builds produce stable workspaces.

Restart generated temporary names in each lexical declaration scope to prevent unrelated functions from renumbering output.
@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ard-lang-dev Ready Ready Preview Sep 1, 2026 1:19pm UTC

@akonwi
akonwi merged commit bcf2663 into main Sep 1, 2026
6 checks passed
@akonwi
akonwi deleted the perf.air-method-lookup branch September 1, 2026 13:27
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