-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Cached stable hash cleanups #95524
Cached stable hash cleanups #95524
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 6ffd654 with merge 0914be4865da468777d1ce5bdd9a546550850308... |
☀️ Try build successful - checks-actions |
Queued 0914be4865da468777d1ce5bdd9a546550850308 with parent 0677edc, future comparison URL. |
Finished benchmarking commit (0914be4865da468777d1ce5bdd9a546550850308): comparison url. Summary: This benchmark run did not return any relevant results. 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. @bors rollup=never |
The new name helps, thanks. I'm still a little unclear about the goal here.
|
/// This is useful if you have values that you intern but never (can?) use for stable | ||
/// hashing. | ||
#[derive(Copy, Clone)] | ||
pub struct TypeAndStableHash<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe call it WithStableHash?
I think @oli-obk means that the perf improvement is not included in this PR and only the refactorings that enable the perf improvement change. |
Nope, the other PR had a perf improvement for these commits, but that seems to be gone now, maybe it was spurious or randomly dependent on inlining decisions |
So is this still worthwhile for the conceptual improvement of separating the hash from |
Yes, I can investigate perf things independently, editing the main message now to reflect that (and will address bjorn's comments) |
1b638b2
to
2e0ef70
Compare
Renamed and force pushed |
@@ -1266,18 +1266,29 @@ pub trait PrettyPrinter<'tcx>: | |||
ty::Ref( | |||
_, | |||
Ty(Interned( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use nested match with the inner match matching on pointee.kind()
? This indentation is getting crazy and pretty unreadable. In addition there are other match arms where the outer type is a reference.
✌️ @oli-obk can now approve this pull request |
@bors r=nnethercote |
📌 Commit 25d6f8e has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e980c62): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
…r=nnethercote Cached stable hash cleanups r? `@nnethercote` Add a sanity assertion in debug mode to check that the cached hashes are actually the ones we get if we compute the hash each time. Add a new data structure that bundles all the hash-caching work to make it easier to re-use it for different interned data structures
r? @nnethercote
Add a sanity assertion in debug mode to check that the cached hashes are actually the ones we get if we compute the hash each time.
Add a new data structure that bundles all the hash-caching work to make it easier to re-use it for different interned data structures