internal: A bunch of cleanups and micro-optimizations - #23197
Open
ChayimFriedman2 wants to merge 5 commits into
Open
internal: A bunch of cleanups and micro-optimizations#23197ChayimFriedman2 wants to merge 5 commits into
ChayimFriedman2 wants to merge 5 commits into
Conversation
|
|
||
| let interner = DbInterner::new_no_crate(db); | ||
| TYPES.get_or_init(|| { | ||
| let interner = DbInterner::conjure(); |
Contributor
There was a problem hiding this comment.
DbInterner::conjure has the comment // FIXME(next-solver): remove this method and I see changes like #22119 which went the other way. Is this really desirable?
Contributor
Author
There was a problem hiding this comment.
I... don't know. It would be nice if we could remove it, but I doubt that. I believe it's the lesser evil.
Instead conjure it only when we initialize. This makes caller cleaner and also a micro-optimization since the initialization closure does not capture anything now.
…n_args_for_alias()` It's not an optimization yet, but in the in-tree solver this function reuses the `GenericArgs` if the assoc has no args of its own.
And since `Projection::project()` does not require `DbInterner`, also remove this requirement from any slice's `new_from_iter()`, which is probably better anyway.
ChayimFriedman2
force-pushed
the
interneds-perf
branch
from
August 26, 2026 03:49
506b1e4 to
8f3f5c9
Compare
Collaborator
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
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.
Details in individual commits.
Reviewing commit-by-commit is recommended; the commits are fully separate.