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

Fix perf regression by correctly matching keywords #104410

Merged
merged 1 commit into from
Nov 23, 2022

Conversation

WaffleLapkin
Copy link
Member

This should (hopefully) fix regression from #99918

r? @estebank

@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 Nov 14, 2022
@BoxyUwU
Copy link
Member

BoxyUwU commented Nov 14, 2022

@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 14, 2022
@bors
Copy link
Contributor

bors commented Nov 14, 2022

⌛ Trying commit 7e9fa83c3100e120dd8602a59b92a39fdd850b17 with merge 4d7446b594be5087c374d6690345989c3382a204...

@bors
Copy link
Contributor

bors commented Nov 14, 2022

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4d7446b594be5087c374d6690345989c3382a204): 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-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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.5%, -0.2%] 22
Improvements ✅
(secondary)
-0.8% [-1.2%, -0.5%] 9
All ❌✅ (primary) -0.3% [-0.5%, -0.2%] 22

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.6% [0.5%, 0.6%] 2
Regressions ❌
(secondary)
2.6% [2.1%, 3.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.3% [-4.3%, -4.3%] 1
All ❌✅ (primary) 0.6% [0.5%, 0.6%] 2

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.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

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

@bors r+

@bors
Copy link
Contributor

bors commented Nov 14, 2022

📌 Commit 7e9fa83c3100e120dd8602a59b92a39fdd850b17 has been approved by estebank

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 Nov 14, 2022
@bors
Copy link
Contributor

bors commented Nov 15, 2022

☔ The latest upstream changes (presumably #104418) made this pull request unmergeable. Please resolve the merge conflicts.

@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 Nov 15, 2022
@WaffleLapkin
Copy link
Member Author

rebased to fix the merge conflict

@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Nov 22, 2022

📌 Commit e2a2816 has been approved by estebank

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 22, 2022
@Jerrody
Copy link
Contributor

Jerrody commented Nov 23, 2022

@WaffleLapkin
It's interesting for me to understand. Why does using case instead of Case::Insensitive give a perf boost?

@WaffleLapkin
Copy link
Member Author

@Jerrody first of all I want to highlight that using Case::Insensitive on non-error path is invalid.

Case::Insensitive leads to .to_lowercase() calls which allocate a string and convert the case, that's why not using it fixes the perf regression.

@Jerrody
Copy link
Contributor

Jerrody commented Nov 23, 2022

@Jerrody first of all I want to highlight that using Case::Insensitive on non-error path is invalid.

Case::Insensitive leads to .to_lowercase() calls which allocate a string and convert the case, that's why not using it fixes the perf regression.

Okay, thanks for the explanation! Keep work you make not big, but very useful work for the compiler: clearing, refactoring and simplifying code. Very cool.

P.S.
I also want to contribute to the compiler, but I don't know how even with compiler book lang developing like a dark forest for me.

@bors
Copy link
Contributor

bors commented Nov 23, 2022

⌛ Testing commit e2a2816 with merge 70f8737...

@bors
Copy link
Contributor

bors commented Nov 23, 2022

☀️ Test successful - checks-actions
Approved by: estebank
Pushing 70f8737 to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Nov 23, 2022

☀️ Test successful - checks-actions
Approved by: estebank
Pushing 70f8737 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 23, 2022
@bors bors merged commit 70f8737 into rust-lang:master Nov 23, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 23, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (70f8737): 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)
-0.3% [-0.5%, -0.2%] 32
Improvements ✅
(secondary)
-0.8% [-1.1%, -0.5%] 8
All ❌✅ (primary) -0.3% [-0.5%, -0.2%] 32

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)
1.5% [1.5%, 1.5%] 1
Improvements ✅
(primary)
-0.9% [-1.3%, -0.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.9% [-1.3%, -0.5%] 2

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)
1.8% [1.5%, 2.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

@WaffleLapkin WaffleLapkin deleted the unregress branch November 27, 2022 07:32
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
Fix perf regression by correctly matching keywords

This should (hopefully) fix regression from rust-lang#99918

r? `@estebank`
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.

7 participants