-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Don't inline OnceCell initialization closures #89031
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
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit ca2d2fa with merge 0c1a9015e49c2d639b1c9832219d5328e7568d8d... |
☀️ Try build successful - checks-actions |
Queued 0c1a9015e49c2d639b1c9832219d5328e7568d8d with parent e4828d5, future comparison URL. |
Finished benchmarking commit (0c1a9015e49c2d639b1c9832219d5328e7568d8d): comparison url. Summary: This change led to small relevant improvements 🎉 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. 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 led to changes in compiler perf. @bors rollup=never |
I guess it's possible this will end up hurting performance if the initialization is actually hot (e.g., the OnceCell is guarding something that must be done only once but usually only happens once). But that seems like a relatively unlikely edge case, and the wins here are nice -- though notably primarily limited to -doc builds, which suggests that this is mostly an improvement for those compiling without PGO (like rustdoc is today). That's most Rust users though. @bors r+ |
📌 Commit ca2d2fa has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (7a3d1a5): comparison url. Summary: This change led to moderate relevant mixed results 🤷 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression |
Weekly perf triage. This was categorized as a regression under our old performance evaluation scheme. However, we have revised our evaluation metrics, especially how we determine significance, and with that in place, the regression to deep-vector incr-patched: println builds are no longer considered significant in this case. @rustbot label: +perf-regression-triaged |
The more general variant of #89026, originally suggested in #86898 (comment)