Repository navigation
Share borrow-check solves and cache impl and shape lookups - #1619
Merged
Merged
Conversation
A blanket impl of a foreign trait lowers every impl in the marker's ingot to decide whether the marker is sealed, and impl headers are relowered on each trait-environment lookup. Use the raw trait index to visit only impls whose trait path names the marker; the solver sees no other impls of it.
The final summary and the borrow check each built and solved the same normalized body in final mode. The summary query now also runs the local conflict and availability checks on its solved body, and the check query reuses that result, walking resolved callees as before. Contract summaries and cycle fallbacks do not solve the body, so the check still solves those itself.
Borrow checking and transport contracts rebuild the capability shape of the same types at every access, normalizing and walking every field each time. Make capability_shape a query.
Every trait-environment lookup lowers the header of each candidate impl, including every blanket impl, and completing a selected candidate lowers it again. Make lower_impl_trait_header a query. Its sealed-marker check lowers marker impls eagerly, so give it fixpoint recovery in case that re-enters the header.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df86060d30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
sbillig
force-pushed
the
compiler-perf-2
branch
from
September 28, 2026 22:22
df86060 to
19b03cf
Compare
cburgdorf
added a commit
that referenced
this pull request
Sep 30, 2026
Several user-facing changes merged after 26.3 were missing release notes entries: - Bugfixes: event ABI `anonymous` flag (#1562), string literal escapes (#1563), effect provider identity (#1564), shared calls on non-Copy fields (#1581), recursive raw pointer types (#1609). - Performance: `DynArray::get` for static elements (#1559), constant string ABI encoding (#1560), compile-time caching (#1617, #1619, #1621). - Native backend features: workspaces, native tests and `std::io` (#1565), process arguments and CPU timing (#1566), `ByteBuffer` (#1580).
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.
Follow-up to #1617. More redundant work removed from semantic analysis, found by profiling
fe testover the fe_test fixtures.semantic_borrow_analysis_query) also runs the local conflict/availability check on its solved body, and the check query reuses that result. The check still walks resolved callees itself. Contract summaries and cycle fallbacks don't solve a body, so for those the check still solves on its own, as before.lower_impl_trait_headerquery: every lookup lowered the header of each candidate impl, and completing the selected candidate lowered it again. The query has fixpoint recovery because the sealed-marker check lowers marker impls eagerly.capability_shapequery: borrowck rebuilt the shapes of the same types at every access.In a profile of the previous head, this work was roughly a fifth of CPU time for the fe_test fixtures. The actual gain hasn't been re-measured yet.