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

[PERF TEST] Make TokenKind Copy #96764

Closed

Conversation

nnethercote
Copy link
Contributor

By leaking nonterminals we can make them &'static instead of
ref-counted, which is enough for this test.

r? @ghost

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 6, 2022
@nnethercote
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

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

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

bors commented May 6, 2022

⌛ Trying commit f1db01ceb09c3a88caadc9664a6d012347780dc1 with merge 7698e668bd4f07761451bd67ab45301a7e6ac82b...

@bors
Copy link
Contributor

bors commented May 6, 2022

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

@rust-timer
Copy link
Collaborator

Queued 7698e668bd4f07761451bd67ab45301a7e6ac82b with parent 9714e13, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7698e668bd4f07761451bd67ab45301a7e6ac82b): comparison url.

Summary:

  • Primary benchmarks: 🎉 relevant improvements found
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 2 12 144 95 146
mean2 0.6% 0.7% -0.8% -1.7% -0.8%
max 0.8% 0.8% -3.0% -13.0% -3.0%

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

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-review -S-waiting-on-perf -perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 6, 2022
@nnethercote
Copy link
Contributor Author

This was just an experiment to discover the potential speedups from making Token into a Copy type. Conclusion: decent improvements, but not amazing.

@nnethercote nnethercote closed this May 6, 2022
@nnethercote
Copy link
Contributor Author

Note to self: a follow-up discussion was had here about better ways to implement this. It's difficult.

@nnethercote nnethercote reopened this Jul 27, 2023
@nnethercote nnethercote force-pushed the impl-Copy-for-Token branch from f1db01c to d94a57e Compare July 27, 2023 05:44
@nnethercote nnethercote 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 27, 2023
@nnethercote nnethercote marked this pull request as draft July 27, 2023 09:57
@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 d94a57e with merge 6deb69be8d85236a858b12f1813e580b8ad425b7...

@bors
Copy link
Contributor

bors commented Jul 28, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6deb69be8d85236a858b12f1813e580b8ad425b7): 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% [-2.4%, -0.3%] 133
Improvements ✅
(secondary)
-2.5% [-12.8%, -0.2%] 56
All ❌✅ (primary) -0.8% [-2.4%, -0.3%] 133

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.4% [0.9%, 5.1%] 70
Regressions ❌
(secondary)
19.2% [1.8%, 33.3%] 20
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) 2.4% [0.9%, 5.1%] 70

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)
- - 0
Improvements ✅
(primary)
-2.1% [-4.2%, -1.0%] 15
Improvements ✅
(secondary)
-4.6% [-16.2%, -1.9%] 39
All ❌✅ (primary) -2.1% [-4.2%, -1.0%] 15

Binary size

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

Bootstrap: 654.49s -> 649.326s (-0.79%)

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

Perf results were similar to earlier. Still not a feasible path forward, though. Getting rid of TokenKind::Interpolated is the real hope.

@Dylan-DPC
Copy link
Member

Closing this as it was a perf test

@Dylan-DPC Dylan-DPC closed this Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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