Skip to content

Replace some uses of vec.drain(..) with vec.into_iter() #90655

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

Merged
merged 1 commit into from
Nov 6, 2021

Conversation

the8472
Copy link
Member

@the8472 the8472 commented Nov 6, 2021

IntoIter should optimize better than Drain

@rust-highfive
Copy link
Contributor

r? @estebank

(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 Nov 6, 2021
@rust-log-analyzer

This comment has been minimized.

IntoIter should optimize better than Drain
@jyn514
Copy link
Member

jyn514 commented Nov 6, 2021

@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Nov 6, 2021

📌 Commit ff87ff9 has been approved by jyn514

@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 Nov 6, 2021
@bors
Copy link
Collaborator

bors commented Nov 6, 2021

⌛ Testing commit ff87ff9 with merge 0727994...

@bors
Copy link
Collaborator

bors commented Nov 6, 2021

☀️ Test successful - checks-actions
Approved by: jyn514
Pushing 0727994 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 6, 2021
@bors bors merged commit 0727994 into rust-lang:master Nov 6, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 6, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0727994): comparison url.

Summary: This change led to moderate relevant improvements 🎉 in compiler performance.

  • Moderate improvement in instruction counts (up to -0.5% on full builds of deeply-nested-async)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants