-
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
Rustdoc: remove ListAttributesIter and use impl Iterator instead #92353
Conversation
Some changes occurred in cc @camelid |
The code changes look good (less code is generally a very good thing :) ). Let's see the impact on performance now. @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 542e4dc1050ef209259bf8c878055ccd063388b8 with merge b0b6ce13300611f32c7f3dca8d5e631cc9288c85... |
☀️ Try build successful - checks-actions |
Queued b0b6ce13300611f32c7f3dca8d5e631cc9288c85 with parent e91ad5f, future comparison URL. |
Finished benchmarking commit (b0b6ce13300611f32c7f3dca8d5e631cc9288c85): 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 try perf run, please indicate this with @bors rollup=never |
There are very nice performance improvements! However there are max RSS regression. I think it'd be fine to ignore them when taking into account the code and performance improvements but let's see what others think. cc @camelid |
I like the version without GATs better, I think using free functions instead of traits makes it easier to understand. |
I liked how easy it was to use GAT and that I didn't have to change the outside code and it has gained a perf. improvement. But it's up to you :) Let me know which version should I use and I'll push it to this branch. |
542e4dc
to
3a3e4b7
Compare
Rebased on top of master. |
Thanks! @bors: r+ rollup=iffy |
@bors rollup=never (this has large perf effects) |
Did this get stuck or is bors currently so busy that |
Bors has missed the comment. |
Let's try again then! @bors: r+ rollup=never |
📌 Commit 3a3e4b7 has been approved by |
⌛ Testing commit 3a3e4b7 with merge 90143a689fa40607ba92bb1065399ea9dc78843f... |
💔 Test failed - checks-actions |
Looks like a spurious failure/timeout? |
Yup, let's retry. @bors: retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (92ed874): comparison url. Summary: This benchmark run shows 45 relevant improvements 🎉 to instruction counts.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
This is a continuation of #92227.
I found that
ListAttributesIter
did not optimize well and replacing it with a simpleimpl Iterator
resulted in 1-3 % instruction count wins locally.Because I needed to use
impl Iterator
on a slice of AST attributes, I had to implement it using GAT + impl trait. I also have a version without GAT here, if GATs are not welcome in rustdoc :D Locally it resulted in equal performance numbers.Can I ask for a perf. run? Thanks.
r? rust-lang/rustdoc