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

Optimize TokenKind::clone. #114119

Merged
merged 1 commit into from
Jul 28, 2023
Merged

Conversation

nnethercote
Copy link
Contributor

TokenKind would impl Copy if it weren't for
TokenKind::Interpolated. This commit makes clone reflect that.

r? @ghost

`TokenKind` would impl `Copy` if it weren't for
`TokenKind::Interpolated`. This commit makes `clone` reflect that.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 27, 2023
@nnethercote
Copy link
Contributor 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 Jul 27, 2023
@bors
Copy link
Contributor

bors commented Jul 27, 2023

⌛ Trying commit ac747a8 with merge 2263ecc3c2223a6f1344b018760c87ac8c887c7d...

@bors
Copy link
Contributor

bors commented Jul 27, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2263ecc3c2223a6f1344b018760c87ac8c887c7d): comparison URL.

Overall result: ✅ improvements - no 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.

@bors rollup=never
@rustbot label: -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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-1.5%, -0.2%] 15
Improvements ✅
(secondary)
-0.8% [-1.6%, -0.3%] 14
All ❌✅ (primary) -0.8% [-1.5%, -0.2%] 15

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-2.6%, -2.6%] 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.9% [3.4%, 8.9%] 10
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 653.837s -> 652.527s (-0.20%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 27, 2023
@nnethercote
Copy link
Contributor Author

icounts look good. But cycles and walltime are up for tt-muncher, which is the benchmark with the best icount results. That's surprising, it seems like this should be a straightforward win for all metrics, the new clone code is just simpler than the old code.

@petrochenkov, what do you think? This is me trying to get part of the win we'd get if we could make Token impl Copy (#96764). Do you think this is too gross for words?

r? @petrochenkov

@petrochenkov
Copy link
Contributor

Do you think this is too gross for words?

Seems fine to me.
@bors r+

@bors
Copy link
Contributor

bors commented Jul 28, 2023

📌 Commit ac747a8 has been approved by petrochenkov

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 Jul 28, 2023
@bors
Copy link
Contributor

bors commented Jul 28, 2023

⌛ Testing commit ac747a8 with merge b95fd85...

@bors
Copy link
Contributor

bors commented Jul 28, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 28, 2023
@bors bors merged commit b95fd85 into rust-lang:master Jul 28, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 28, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b95fd85): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.0% [-1.5%, -0.5%] 10
Improvements ✅
(secondary)
-0.7% [-1.0%, -0.3%] 7
All ❌✅ (primary) -1.0% [-1.5%, -0.5%] 10

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)
- - 0
Regressions ❌
(secondary)
2.2% [0.9%, 3.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-3.0%, -1.5%] 5
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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.8% [3.1%, 8.9%] 11
Improvements ✅
(primary)
-2.0% [-2.1%, -2.0%] 2
Improvements ✅
(secondary)
-3.1% [-3.6%, -2.9%] 5
All ❌✅ (primary) -2.0% [-2.1%, -2.0%] 2

Binary size

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

Bootstrap: 651.8s -> 650.875s (-0.14%)

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. 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.

5 participants