-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
extract code path shared between FromIterator and Extend #84255
Conversation
r? @kennytm (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 3106144c936d272948ff0b8810fed5631313b3c5 with merge ac90c16857e21ef6d6b1345ef9256dce98e9fe32... |
☀️ Try build successful - checks-actions |
Queued ac90c16857e21ef6d6b1345ef9256dce98e9fe32 with parent 2faef12, future comparison URL. |
Finished benchmarking try commit (ac90c16857e21ef6d6b1345ef9256dce98e9fe32): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
e4a49fc
to
4f49480
Compare
☔ The latest upstream changes (presumably #84266) made this pull request unmergeable. Please resolve the merge conflicts. |
4f49480
to
4e185ae
Compare
☔ The latest upstream changes (presumably #83770) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #86559) made this pull request unmergeable. Please resolve the merge conflicts. |
f96b375
to
32e5469
Compare
Has something been changed after reverting #83770? I'm seeing #83770 (comment) and would like to know if we should re-run a perf-check. |
lgtm, but let's perf again if we have concern. @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 32e5469d7eaea4af7d07d2ae2fad85571eb99611 with merge 5f36abf9c680c844c0922aba74bf53de36c196df... |
☀️ Try build successful - checks-actions |
Queued 5f36abf9c680c844c0922aba74bf53de36c196df with parent cd8b56f, future comparison URL. |
Finished benchmarking commit (5f36abf9c680c844c0922aba74bf53de36c196df): 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. 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never |
Previously FromIterator specialization called with_capacity() and then delegated to Extend which called reserve(). The reserve() is only needed when extending. This should reduce the amount of generated IR.
Co-authored-by: bjorn3 <[email protected]>
32e5469
to
7f904fb
Compare
let's see if this is due to changes in inlining. @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 7f904fb with merge ba1a6f780e8a742e9ef7c9ad17635f9dc05e173b... |
☀️ Try build successful - checks-actions |
Queued ba1a6f780e8a742e9ef7c9ad17635f9dc05e173b with parent 1af55d1, future comparison URL. |
Finished benchmarking commit (ba1a6f780e8a742e9ef7c9ad17635f9dc05e173b): 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. 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never |
Looks like it's no longer worth it. |
This should eliminate the call to
reserve
on theFromIterator
code path since that's redundant after thewith_capacity
call. So it should result in reduced IR.I hope this will result in better compile times by itself, but if not it may still improve the numbers combined with the revert in #83797 which would increase the code weight of
reserve()
@rustbot label T-libs-impl