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 as_deref in compiler (but only where it makes sense) #104507

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

WaffleLapkin
Copy link
Member

This simplifies some code :3

(there are some changes that are not exacly as_deref, but more like "clever Option/Result method use")

@rustbot
Copy link
Collaborator

rustbot commented Nov 16, 2022

r? @wesleywiser

(rustbot has picked a reviewer for you, use r? to override)

@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 16, 2022
@rustbot
Copy link
Collaborator

rustbot commented Nov 16, 2022

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@wesleywiser
Copy link
Member

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

bors commented Nov 19, 2022

⌛ Trying commit 94470f4 with merge f86c17cdc363b12bc54a20fbff6b6e1a8744ec4d...

@bors
Copy link
Contributor

bors commented Nov 19, 2022

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f86c17cdc363b12bc54a20fbff6b6e1a8744ec4d): 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
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 2
All ❌✅ (primary) - - 0

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.3% [-2.9%, -1.0%] 4
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)
3.9% [1.8%, 5.4%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.9% [1.8%, 5.4%] 6

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 19, 2022
@WaffleLapkin
Copy link
Member Author

The perf doesn't show any regressions (as expected, this doesn't really change anything). ctfe-stress-5 | {opt,debug} | incr-unchanged for some reason got ""significantly"" faster (Significance Factor ≈ 9x), looking at its history it looks legitimate, although surprising — I don't see anything here that could cause this. I think this is good to go.

@wesleywiser
Copy link
Member

Thanks @WaffleLapkin!

@bors r+

@bors
Copy link
Contributor

bors commented Nov 22, 2022

📌 Commit 94470f4 has been approved by wesleywiser

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

bors commented Nov 24, 2022

⌛ Testing commit 94470f4 with merge 872631d...

@bors
Copy link
Contributor

bors commented Nov 24, 2022

☀️ Test successful - checks-actions
Approved by: wesleywiser
Pushing 872631d to master...

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

Finished benchmarking commit (872631d): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

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)
-3.0% [-3.5%, -2.5%] 2
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)
4.6% [4.1%, 5.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Dec 14, 2022
Use `as_deref` in compiler (but only where it makes sense)

This simplifies some code :3

(there are some changes that are not exacly `as_deref`, but more like "clever `Option`/`Result` method use")
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
Use `as_deref` in compiler (but only where it makes sense)

This simplifies some code :3

(there are some changes that are not exacly `as_deref`, but more like "clever `Option`/`Result` method use")
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