Uh oh!
There was an error while loading. Please reload this page.
rustc_typeck: remove the "preload all impls ever" workaround in coherence. - #25323
Conversation
…ake it clear that it only populates inherent impls.
…rait's impls from all the crates.
rust-highfive
commented
May 12, 2015
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
eddyb
commented
May 12, 2015
@brson Any chance this can make it into 1.0? I don't mind it personally, but I've seen some interest on IRC for having the (minor IMO) compile-time wins here in 1.0. |
bstrie
commented
May 12, 2015
@eddyb, you're my hero 😻 |
pnkfelix
commented
May 12, 2015
@bors r+ |
bors
commented
May 12, 2015
📌 Commit 75cd8f9 has been approved by |
pnkfelix
commented
May 12, 2015
@bors p=5 |
pnkfelix
commented
May 12, 2015
(Regarding 1.0, I'm inclined to say the risk/reward here does not pay off; there are other lower risk PR's that also have UX impact that we declined much earlier in beta cycle) |
pnkfelix
commented
May 12, 2015
bors
commented
May 12, 2015
The loop to load all the known impls from external crates seems to have been used because `ty::populate_implementations_for_trait_if_necessary` wasn't doing its job, and solely relying on it resulted in loading only impls in the same crate as the trait.
Coherence for `librustc` was reduced from 18.310s to 0.610s, from stage1 to stage2.
Interestingly, type checking also went from 46.232s to 42.003s, though that could be noise or unrelated improvements.
On a smaller scale, `fn main() {}` now spends 0.003s in coherence instead of 0.368s, which fixes#22068.
It also peaks at only 1.2MB, instead of 16MB of heap usage.nikomatsakis
commented
May 12, 2015
Without reading too closely, this looks great to me, and I agree with @pnkfelix's assessment that this is not a good candidate for backporting. |
bors
commented
May 12, 2015
killercup
commented
May 12, 2015
Nice, those are some serious speedups! Looks like 1.1 will already improve compile speed. |
The loop to load all the known impls from external crates seems to have been used because
ty::populate_implementations_for_trait_if_necessarywasn't doing its job, and solely relying on it resulted in loading only impls in the same crate as the trait.Coherence for
librustcwas reduced from 18.310s to 0.610s, from stage1 to stage2.Interestingly, type checking also went from 46.232s to 42.003s, though that could be noise or unrelated improvements.
On a smaller scale,
fn main() {}now spends 0.003s in coherence instead of 0.368s, which fixes#22068.It also peaks at only 1.2MB, instead of 16MB of heap usage.