-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(resolver): avoid cloning when iterating using RcVecIter #14690
Merged
+32
−45
Conversation
This file contains 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
rustbot
added
A-dependency-resolution
Area: dependency resolution and the resolver
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Oct 15, 2024
Eh2406
approved these changes
Oct 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, a good improvement. I'm surprised it makes such a difference. Thank you for finding it.
x-hgg-x
force-pushed
the
resolver-perf-3
branch
2 times, most recently
from
October 15, 2024 17:11
f7f209f
to
e80553f
Compare
x-hgg-x
force-pushed
the
resolver-perf-3
branch
from
October 15, 2024 17:13
e80553f
to
5acc1ca
Compare
@bors r+ |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Oct 15, 2024
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 19, 2024
Update cargo 7 commits in 8c30ce53688e25f7e9d860b33cc914fb2957ca9a..cf53cc54bb593b5ec3dc2be4b1702f50c36d24d5 2024-10-15 16:43:16 +0000 to 2024-10-18 13:56:15 +0000 - feat: Stabilize MSRV-aware resolver config (rust-lang/cargo#14639) - Help with `[patch.crates.io]` (rust-lang/cargo#14700) - test: Migrate publish snapshotting to snapbox (rust-lang/cargo#14642) - Bump to 0.85.0; update changelog (rust-lang/cargo#14695) - Fix typo in faq.md (rust-lang/cargo#14696) - fix(registry): `HttpRegistry` `block_until_ready` returns early when work is still pending (rust-lang/cargo#14694) - fix(resolver): avoid cloning when iterating using RcVecIter (rust-lang/cargo#14690)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-dependency-resolution
Area: dependency resolution and the resolver
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
What does this PR try to resolve?
Follow up of Eh2406/pubgrub-crates-benchmark#6 (comment).
This PR modifies the internal
RcVecIter
struct so that we can iterate on its items without cloning them. This improves performance of the resolver because eagerly cloningArc<T>
is not free.Comparison of performance using
solana-core = "=1.0.5"
inCargo.toml
:r? Eh2406