-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
Remove a lit_to_const call #133897
Conversation
Some changes occurred in match checking cc @Nadrieril |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Test performance impact of removing an unperfed optimization
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (3170707): comparison URL. Overall result: no relevant changes - no action neededBenchmarking 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 Instruction countThis 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. CyclesResults (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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 768.023s -> 768.128s (0.01%) |
Jup, as I thought. Undertested, but also 🤷 this makes further lit_to_const work easier, so let's remove it. |
fcaaa11
to
44019ee
Compare
There was a problem hiding this 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 🤷
r? jieyouxu |
☀️ Test successful - checks-actions |
Finished benchmarking commit (cdb89d6): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 769.879s -> 768.799s (-0.14%) |
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 commonconst { 42 }
blocks are, I'd expect these to occur mostly from macros (likethread_local!
)