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

Use normal iterators instead of the internal vec::ExtendWith #104624

Closed
wants to merge 1 commit into from

Conversation

scottmcm
Copy link
Member

@scottmcm scottmcm commented Nov 20, 2022

Repeating is TrustedLen, so we don't need another copy of the TrustedLen specialization for extend.

All the codegen tests are passing (and I made one stricter to help be sure), so let's see if perf is also happy with it.

(This is a simpler version of #104596, which tried to do too many things at once.)

r? @ghost

Built atop #104435; will leave draft until I can rebase atop that.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 20, 2022
Repeating is `TrustedLen`, so we don't need another copy of [the `TrustedLen` specialization for `extend`](https://github.com/rust-lang/rust/blob/c5d82ed7a4ad94a538bb87e5016e7d5ce0bd434b/library/alloc/src/vec/spec_extend.rs#L27).

(This is a simpler version of rust-lang#104596, which tried to do too many things at once.)
@scottmcm
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 20, 2022
@bors
Copy link
Contributor

bors commented Nov 20, 2022

⌛ Trying commit 4820629 with merge a31a4b1059fe70a1571639674d618845dcb8c7dd...

@bors
Copy link
Contributor

bors commented Nov 20, 2022

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a31a4b1059fe70a1571639674d618845dcb8c7dd): 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.

mean range count
Regressions ❌
(primary)
0.4% [0.2%, 0.5%] 14
Regressions ❌
(secondary)
2.9% [0.2%, 5.1%] 10
Improvements ✅
(primary)
-0.7% [-1.1%, -0.5%] 9
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-1.1%, 0.5%] 23

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.

mean range count
Regressions ❌
(primary)
2.2% [0.3%, 5.1%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.9% [-2.9%, -2.8%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [-2.9%, 5.1%] 7

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.

mean range count
Regressions ❌
(primary)
0.7% [0.7%, 0.7%] 1
Regressions ❌
(secondary)
3.9% [3.7%, 4.4%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [0.7%, 0.7%] 1

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 20, 2022
@scottmcm
Copy link
Member Author

A couple of nice wins, but overall too many losses.

Time for yet another different approach :(

@scottmcm scottmcm closed this Nov 23, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 5, 2023
…=scottmcm

Remove ExtendElement, ExtendWith, extend_with

Related to  rust-lang#104624, broken up into two commits. The first removes wrapper trait ExtendWith and its only implementer struct ExtendElement. The second may have perf issues so may be reverted/removed if no alternate fix is found; it should be profiled.

r? `@scottmcm`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants