Skip to content
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

[resolve] Use unwrap_or_else instead of unwrap_or in a hot path #78508

Merged
merged 1 commit into from
Oct 29, 2020

Conversation

wesleywiser
Copy link
Member

This improves the performance of the resolve_crate function by 30% for
a very large single file crate with auto-generated C bindings.

cc @rylev

@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 29, 2020
@jyn514 jyn514 added A-resolve Area: Path resolution I-compiletime Issue: Problems and improvements with respect to compile times. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 29, 2020
This improves the performance of the `resolve_crate` function by 30% for
a very large single file crate with auto-generated C bindings.
@petrochenkov
Copy link
Contributor

Thanks!
r? @petrochenkov @bors r+

@bors
Copy link
Contributor

bors commented Oct 29, 2020

📌 Commit 1c1c591 has been approved by petrochenkov

@bors 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 29, 2020
@simonvandel
Copy link
Contributor

Should this be rollup=never since it is performance related?

@wesleywiser
Copy link
Member Author

@bors rollup=never

@bors
Copy link
Contributor

bors commented Oct 29, 2020

⌛ Testing commit 1c1c591 with merge 6bdae9e...

@bors
Copy link
Contributor

bors commented Oct 29, 2020

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 6bdae9e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 29, 2020
@bors bors merged commit 6bdae9e into rust-lang:master Oct 29, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Path resolution I-compiletime Issue: Problems and improvements with respect to compile times. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants