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

Avoid cloning a collection only to iterate over it #100497

Merged
merged 1 commit into from
Aug 28, 2022

Conversation

kadiwa4
Copy link
Contributor

@kadiwa4 kadiwa4 commented Aug 13, 2022

@rustbot label: +C-cleanup

@rust-highfive
Copy link
Collaborator

r? @CraftSpider

(rust-highfive has picked a reviewer for you, use r? to override)

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-cleanup Category: PRs that clean code up or issues documenting cleanup. labels Aug 13, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 13, 2022
@cjgillot
Copy link
Contributor

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Aug 18, 2022

📌 Commit 4eebcb9 has been approved by cjgillot

It is now in the queue for this repository.

@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 Aug 18, 2022
@compiler-errors
Copy link
Member

Gonna do a perf run on this, if it's perf-sensitive then let's leave it as rollup=never, otherwise we can make it rollup=maybe

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@bors
Copy link
Contributor

bors commented Aug 26, 2022

🙅 Please do not try after a pull request has been r+ed. If you need to try, unapprove (r-) it first.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 26, 2022
@compiler-errors
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 26, 2022
@compiler-errors
Copy link
Member

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@compiler-errors
Copy link
Member

(i'm doing this because the rollup=iffy list is super long and it's probably not getting any shorter)

@compiler-errors
Copy link
Member

@bors try

@bors
Copy link
Contributor

bors commented Aug 26, 2022

⌛ Trying commit 4eebcb9 with merge feb1ea3e27edab7fa9b1eb2edfe0f46c52711ca8...

@bors
Copy link
Contributor

bors commented Aug 27, 2022

☀️ Try build successful - checks-actions
Build commit: feb1ea3e27edab7fa9b1eb2edfe0f46c52711ca8 (feb1ea3e27edab7fa9b1eb2edfe0f46c52711ca8)

@rust-timer
Copy link
Collaborator

Queued feb1ea3e27edab7fa9b1eb2edfe0f46c52711ca8 with parent c07a8b4, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (feb1ea3e27edab7fa9b1eb2edfe0f46c52711ca8): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.3%] 3
Improvements ✅
(primary)
-0.5% [-0.7%, -0.3%] 4
Improvements ✅
(secondary)
-0.9% [-1.2%, -0.5%] 8
All ❌✅ (primary) -0.5% [-0.7%, -0.3%] 4

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
5.9% [2.1%, 9.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@rustbot rustbot added perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 28, 2022
@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 28, 2022
@compiler-errors
Copy link
Member

Secondary regressions are outweighed by primary and secondary improvements.

@bors r=cjgillot rollup=never

@bors
Copy link
Contributor

bors commented Aug 28, 2022

📌 Commit 4eebcb9 has been approved by cjgillot

It is now in the queue for this repository.

@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. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 28, 2022
@bors
Copy link
Contributor

bors commented Aug 28, 2022

⌛ Testing commit 4eebcb9 with merge ce36e88...

@bors
Copy link
Contributor

bors commented Aug 28, 2022

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing ce36e88 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 28, 2022
@bors bors merged commit ce36e88 into rust-lang:master Aug 28, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 28, 2022
@bors bors mentioned this pull request Aug 28, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ce36e88): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
0.5% [0.5%, 0.6%] 6
Regressions ❌
(secondary)
0.8% [0.5%, 1.1%] 10
Improvements ✅
(primary)
-0.6% [-0.8%, -0.5%] 3
Improvements ✅
(secondary)
-1.0% [-1.2%, -0.5%] 4
All ❌✅ (primary) 0.2% [-0.8%, 0.6%] 9

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-1.3%, -1.3%] 1
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-4.1% [-4.2%, -4.0%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -4.1% [-4.2%, -4.0%] 2

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@nnethercote
Copy link
Contributor

html5ever-0.26.0 has been noisy recently, so I think those numbers can be ignored. The doc improvements for webrender, syn and regex look like they're real, because they were seen on both perf runs. The other changes are iffy, may just be noise.

@kadiwa4 kadiwa4 deleted the remove_clone_into_iter branch September 5, 2022 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants