Skip to content

Remove a lit_to_const call #133897

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

Merged
merged 1 commit into from
Dec 7, 2024
Merged

Remove a lit_to_const call #133897

merged 1 commit into from
Dec 7, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Dec 5, 2024

We have so many special cases of match expr.kind { Lit() => {}, Unary(Neg, Lit()) => {} }... I'm trying to figure out how to get these all unified, but outright removing some is good, too. So let's try it.

Tho we don't have many const {} blocks in the perf test suite... But I also don't know how common const { 42 } blocks are, I'd expect these to occur mostly from macros (like thread_local!)

@rustbot
Copy link
Collaborator

rustbot commented Dec 5, 2024

r? @fmease

rustbot has assigned @fmease.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Dec 5, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 5, 2024

Some changes occurred in match checking

cc @Nadrieril

@oli-obk
Copy link
Contributor Author

oli-obk commented Dec 5, 2024

@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 Dec 5, 2024
@bors
Copy link
Collaborator

bors commented Dec 5, 2024

⌛ Trying commit fcaaa11 with merge 3170707...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 5, 2024
Test performance impact of removing an unperfed optimization
@bors
Copy link
Collaborator

bors commented Dec 5, 2024

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3170707): comparison URL.

Overall result: no relevant changes - 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 benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

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

Cycles

Results (secondary 2.3%)

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

Binary size

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

Bootstrap: 768.023s -> 768.128s (0.01%)
Artifact size: 330.84 MiB -> 330.79 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 5, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Dec 5, 2024

Jup, as I thought. Undertested, but also 🤷

this makes further lit_to_const work easier, so let's remove it.

@oli-obk oli-obk changed the title Test performance impact of removing an unperfed optimization Remove a lit_to_const call Dec 5, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This simplification makes sense to me. If this turns out perf load-bearing we can revert 🤷

@jieyouxu
Copy link
Member

jieyouxu commented Dec 6, 2024

r? jieyouxu
@bors r+ rollup=never (undertested, underexercised in perf suite that's potentially perf-sensitive)

@bors
Copy link
Collaborator

bors commented Dec 6, 2024

📌 Commit 44019ee has been approved by jieyouxu

It is now in the queue for this repository.

@rustbot rustbot assigned jieyouxu and unassigned fmease Dec 6, 2024
@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 Dec 6, 2024
@bors
Copy link
Collaborator

bors commented Dec 7, 2024

⌛ Testing commit 44019ee with merge cdb89d6...

@bors
Copy link
Collaborator

bors commented Dec 7, 2024

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing cdb89d6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 7, 2024
@bors bors merged commit cdb89d6 into rust-lang:master Dec 7, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 7, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cdb89d6): 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 (primary 0.9%, secondary 2.5%)

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.9% [0.9%, 0.9%] 1
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.9% [0.9%, 0.9%] 1

Cycles

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

Binary size

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

Bootstrap: 769.879s -> 768.799s (-0.14%)
Artifact size: 330.83 MiB -> 330.84 MiB (0.01%)

@oli-obk oli-obk deleted the push-lsxrqtqqwmpt branch December 7, 2024 10:58
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.

6 participants