-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: Put GenericArg::Type into a Box #93941
rustdoc: Put GenericArg::Type into a Box #93941
Conversation
Some changes occurred in cc @camelid |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit f2a2cd2834bd0686f539fea10d0fe5dc6c66afc2 with merge 92df98fcbbbfd0cceadbaec668e157c484de8eb8... |
@GuillaumeGomez |
I'm so sorry I forgot again... >< I'll add it here but sorry for the useless noise... |
☀️ Try build successful - checks-actions |
Queued 92df98fcbbbfd0cceadbaec668e157c484de8eb8 with parent f8f1751, future comparison URL. |
Finished benchmarking commit (92df98fcbbbfd0cceadbaec668e157c484de8eb8): comparison url. Summary: This benchmark run shows 29 relevant regressions 😿 to instruction counts.
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 |
Hmm, the instruction count regressions are higher than I'd like ... but the memory improvement does seem nice. Ideally, we would try to shrink |
I'll leave it up to you. We can still take a look at Actually I'll take a look at |
Yeah, I've been meaning to get back to trying to shrink Type for a while now. If you want to look into it, can you try to get rid of https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/clean/types/enum.Type.html#variant.QPath.field.self_def_id? That's a hack that should be removed and takes up decent memory space. |
f2a2cd2
to
45fcaaa
Compare
☔ The latest upstream changes (presumably #94009) made this pull request unmergeable. Please resolve the merge conflicts. |
So what should we do here? |
My current thinking is the perf improvements aren't worth the regressions and increased code complexity (having to box and unbox). So I propose closing this PR. |
Agreed! |
…, r=notriddle rustdoc: Reduce clean::Type size There is no need to keep the `DefId` around since it's allow used to compute if we should show a cast or not. As such, we can simply directly store the boolean. I think it's not what you had in mind `@camelid` but I guess it's still an improvement? 😉 It was discussed in rust-lang#93941. r? `@camelid`
This is a small experiment to see how it'll impact performance (I think it'll increase memory usage a bit). I don't think it'll be worthwhile to merge it.
r? @camelid