-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Make MIR pass name a compile-time constant. #120161
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Make MIR pass name a compile-time constant. r? `@ghost`
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (db13a70): comparison URL. Overall result: ✅ improvements - 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 is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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 sizeResultsThis 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.
Bootstrap: 665.464s -> 664.961s (-0.08%) |
498ef48
to
b303262
Compare
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
r? compiler |
This comment has been minimized.
This comment has been minimized.
Given that this is perf neutral, I don't think it makes sense to merge, as the runtime code is a lot nicer. |
b303262
to
ad25f0e
Compare
I agree the code is much uglier than the runtime implementation. I'd be glad to use the exact same code, but I had to wrestle the compiler into accepting this mess. Perf-wise, the improvement is tiny (<1%) but measurable. See the unfiltered results. |
I recall trying to change this as well to avoid all those calls to memrchr, but at the time API available from const context was even smaller. This implementation seems reasonable to me. @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a58ec8f): 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)This benchmark run did not return any relevant results for this metric. 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: 663.041s -> 664.028s (0.15%) |
MirPass: make name more const Continues rust-lang#120161, this time applied to `MirPass` instead of `MirLint`, locally shaves few (very few) instructions off. r? `@cjgillot`
MirPass: make name more const Continues rust-lang#120161, this time applied to `MirPass` instead of `MirLint`, locally shaves few (very few) instructions off. r? ``@cjgillot``
Rollup merge of rust-lang#120733 - klensy:trait-const-fn, r=oli-obk MirPass: make name more const Continues rust-lang#120161, this time applied to `MirPass` instead of `MirLint`, locally shaves few (very few) instructions off. r? ``@cjgillot``
Post-processing a compile-time string at runtime is a bit silly. This PR makes CTFE do it all.