Don't inline OnceCell initialization closures by the8472 · Pull Request #89031 ·...
source link: https://github.com/rust-lang/rust/pull/89031
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
The more general variant of #89026, originally suggested in #86898 (comment)
(rust-highfive has picked a reviewer for you, use r? to override)
Awaiting bors try build completion.
@rustbot label: +S-waiting-on-perf
Try build successful - checks-actions
Build commit: 0c1a901 (0c1a9015e49c2d639b1c9832219d5328e7568d8d
)
Finished benchmarking commit (0c1a901): comparison url.
Summary: This change led to small relevant improvements in compiler performance.
- Small improvement in instruction counts (up to -0.6% on
incr-unchanged
builds ofissue-46449
)
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
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression
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 Mark-Simulacrum
Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 7a3d1a5 to master...
Finished benchmarking commit (7a3d1a5): comparison url.
Summary: This change led to moderate relevant mixed results in compiler performance.
- Moderate improvement in instruction counts (up to -0.9% on
full
builds ofhelloworld
) - Moderate regression in instruction counts (up to 0.7% on
incr-patched: println
builds ofdeep-vector
)
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-triaged
along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged
label to this PR.
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
No reviews
None yet
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK