-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Stop allocating vtable entries for non-object-safe methods #88552
Conversation
r? @nagisa (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 bb74667e52e83b465fb47c2d32634fdc7ace0637 with merge f884054025e1df9c3b9c6e59123af3d8014e085d... |
☀️ Try build successful - checks-actions |
Queued f884054025e1df9c3b9c6e59123af3d8014e085d with parent 00ce166, future comparison URL. |
Finished benchmarking try commit (f884054025e1df9c3b9c6e59123af3d8014e085d): comparison url. Summary: This change led to large 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 perf run, please indicate this with @bors rollup=never |
Introduced a query. Please do another perf run |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 6c7644deb04e51894c7abf0da8abb0fcaeaac15f with merge f4005c89228ae80fe5d43005600154074957d538... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 83c5dab94c62142956dd2e86455afe37303ee36e with merge 4e5b7bbe1459e4b0667320310649719962750f5a... |
☀️ Try build successful - checks-actions |
Queued 4e5b7bbe1459e4b0667320310649719962750f5a with parent 226e181, future comparison URL. |
Finished benchmarking try commit (4e5b7bbe1459e4b0667320310649719962750f5a): comparison url. Summary: This change led to small 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 perf run, please indicate this with @bors rollup=never |
Done (I manually edited the file so I don't have to recompile everything) |
@bors delegate=nbdd0121 |
✌️ @nbdd0121 can now approve this pull request |
Race condition :) @bors r=nagisa |
📌 Commit 7c2031082fa92f345ec377e9f91c64da9ce51321 has been approved by |
This comment has been minimized.
This comment has been minimized.
@bors r- |
@bors r- CI is failing again; please wait for CI to pass before re-approving the PR (otherwise it slows down the bors queue) :) |
Heh, another race condition :) |
@bors r=nagisa |
📌 Commit 97214ee has been approved by |
☀️ Test successful - checks-actions |
This had mixed results on landing, generally, with no significant cycle count results. Marking as triaged. |
Current a vtable entry is allocated for all associated fns, even if the method is not object-safe: https://godbolt.org/z/h7vx6f35T
As a result, each vtable for
Iterator
' currently consumes 74usize
s. This PR stops allocating vtable entries for those methods, reducing vtable size of eachIterator
vtable to 7usize
s.Note that this PR introduces will cause more invocations of
is_vtable_safe_method
. So a perf run might be needed. If result isn't favorable then we might need to query-ifyis_vtable_safe_method
.