-
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
rustdoc: Optimize impl sorting during rendering #109399
Conversation
r? @jsha (rustbot has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 4d55aff with merge 27184c344642b1a44cda998413b1b72972b11c05... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (27184c344642b1a44cda998413b1b72972b11c05): 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.
CyclesResultsThis 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.
|
Thanks! @bors r+ rollup=never |
⌛ Testing commit 4d55aff with merge d13a19801c0a45c55c11f0cdb582b8b7da4f4f9d... |
💔 Test failed - checks-actions |
This comment was marked as outdated.
This comment was marked as outdated.
⌛ Testing commit 4d55aff with merge f63fb86b6aeb292fd6a86ae476f1156b7c674b4f... |
💔 Test failed - checks-actions |
@bors retry github incident |
☀️ Test successful - checks-actions |
Finished benchmarking commit (d012d2f): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression 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.
CyclesResultsThis 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.
|
The one regression is noise. @rustbot label: +perf-regression-triaged |
This should fix the perf regression on bitmaps-3.1.0 from #107765.
The bitmaps crate has a lot of impls:
and the logic in
fn print_item
sorts them in natural order.Before #107765 the impls came in source order, which happened to be already sorted in the necessary way.
So the comparison function was called fewer times.
After #107765 the impls came in "stable" order (based on def path hash).
So the comparison function was called more times to sort them.
The comparison function was terribly inefficient, so it caused a large perf regression.
This PR attempts to make it more efficient by using cached keys during sorting.