-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Find the largest niche when computing layouts #50860
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
The head ref may contain hidden characters: "big-niches-for-big-doggos-\u{1F415}"
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
src/librustc/ty/layout.rs
Outdated
@@ -1674,40 +1685,56 @@ impl<'a, 'tcx, C> TyLayoutMethods<'tcx, C> for Ty<'tcx> | |||
} | |||
} | |||
|
|||
pub struct Niche { |
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.
Can this struct remain private, for now?
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.
Done.
Otherwise we end up with `Option<Option<(&(), bool)>>` unnecessarily large.
fbba4d9
to
b7db68f
Compare
@bors try cc @Mark-Simulacrum @nikomatsakis We should try to figure out how expensive this might be (it could result in type traversals doing much more work, and adding caching is non-trivial in this case). |
⌛ Trying commit b7db68f with merge 3efc4382f7de39b68b475b09666347b27368ee3f... |
☀️ Test successful - status-travis |
r? @eddyb |
Perf queued. |
Perf result is now available http://perf.rust-lang.org/compare.html?start=fd18d2537ddcffb24b3739393b085ed28dfc340e&end=3efc4382f7de39b68b475b09666347b27368ee3f&stat=instructions%3Au (stylo-servo's "clean incremental" result is spurious because of a hash table; all other results are within ±1.5%) |
So this can land as is, right? |
Nice branch name 😄 🐶 |
@bors r+ |
📌 Commit b7db68f has been approved by |
Find the largest niche when computing layouts Otherwise we end up with `Option<Option<(&(), bool)>>` unnecessarily large.
☀️ Test successful - status-appveyor, status-travis |
Otherwise we end up with
Option<Option<(&(), bool)>>
unnecessarily large.