Skip to content

Compiler: separate compilation with module interface artifacts (study delta 5 — endgame) #684

Open

Description

@ehartford

Part of #679. Every stage compiles ONE merged ~160k-line program in one process: out/gen/main.w's use-graph parses into a single AstPool (src/compiler/Frontend.w:1674-1701), and the stage cache signature hashes ALL src .w files, so a one-byte change recompiles 160k lines three times (stage1+stage2+link = 523s of every battery — the constant nothing else in #679 touches). References: Go cmd/compile = 48 packages against mmapped export data; Rust = 75 crates against .rmeta; Swift = indexed binary .swiftmodules; Vale = 3 process-isolated components with .vast handoff. Adopt: per-module compile targets with serialized interface artifacts (AST/Sema SoA tables dump cleanly — see #682), cross-module resolution at link. Rebuild cost becomes O(change), peak RSS becomes max-of-module. Prerequisites: #680 (parallel executor) and #682 (serialized frontend artifacts). Sequence LAST — it delivers nothing partial; everything else multiplies it. Fixpoint invariant preserved: the byte-compare gains per-module granularity.

Activity

  1. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Triage 2026-10-25, with v0.15.3.0 (main a261b65): still open. Each stage still compiles the compiler as one merged program (stage1 82 s, stage2 82 s on today's battery); the .wo bundles give separate compilation to the corpora, not to the compiler.

    post-release: the endgame of the build-performance campaign.

  2. added this to the post-v0.16.0 milestone on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions