[WIP] traits/fulfill: track GenericArgss instead of InferTys in stalled_on.#70181
[WIP] traits/fulfill: track GenericArgss instead of InferTys in stalled_on.#70181eddyb wants to merge 1 commit intorust-lang:masterfrom
GenericArgss instead of InferTys in stalled_on.#70181Conversation
244a9d7 to
e63c410
Compare
|
I'm doing a perf run with just this first commit, to assess the impact of having to match on
@bors try @rust-timer queue |
|
Awaiting bors try build completion |
|
⌛ Trying commit e63c410 with merge fc63e0e7ac01afe8ebf2cbb38466eb80c1d42922... |
|
☀️ Try build successful - checks-azure |
|
Queued fc63e0e7ac01afe8ebf2cbb38466eb80c1d42922 with parent f4c675c, future comparison URL. |
|
Finished benchmarking try commit fc63e0e7ac01afe8ebf2cbb38466eb80c1d42922, comparison URL. |
|
Perf seems mostly improved I'd say, but it's a bit of a wash. |
|
@Centril most of the perf improvements around 1% I've seen lately look dubious and unrelated (i.e. likely noise), so I focus on the regressions and try to find a relevant one. Besides, it should be impossible for this PR to make anything faster, so there's that.
I think the efficient approach moving forward would be to make an rust/src/librustc_infer/infer/mod.rs Lines 1631 to 1655 in 1057dc9 I'm closing this PR to serve as a tombstone for the inefficient approach. |
| t: ty::PolyTraitRef<'tcx>, | ||
| ) -> Vec<ty::InferTy> { | ||
| t.skip_binder() // ok b/c this check doesn't care about regions | ||
| ty: ty::PolyTraitRef<'tcx>, |
There was a problem hiding this comment.
Oops, I should've renamed this to trait_ref.
…omatsakis traits/fulfill: allow `stalled_on` to track `ty::Const::Infer(_)` (unused yet). This PR addresses the representation side of rust-lang#70180, but only *actually collects* `ty::Infer`s via `Ty::walk` into `stalled_on` (collecting `ty::ConstKind::Infer`s requires rust-lang#70164). However, it should be enough to handle rust-lang#70107's needs (WF obligations are stalled only on the outermost type/const being an inference variable, no `walk`-ing is involved). This is my second attempt, see rust-lang#70181 for the previous one, which unacceptably regressed perf. r? @nikomatsakis cc @nnethercote
…omatsakis traits/fulfill: allow `stalled_on` to track `ty::Const::Infer(_)` (unused yet). This PR addresses the representation side of rust-lang#70180, but only *actually collects* `ty::Infer`s via `Ty::walk` into `stalled_on` (collecting `ty::ConstKind::Infer`s requires rust-lang#70164). However, it should be enough to handle rust-lang#70107's needs (WF obligations are stalled only on the outermost type/const being an inference variable, no `walk`-ing is involved). This is my second attempt, see rust-lang#70181 for the previous one, which unacceptably regressed perf. r? @nikomatsakis cc @nnethercote
…omatsakis traits/fulfill: allow `stalled_on` to track `ty::Const::Infer(_)` (unused yet). This PR addresses the representation side of rust-lang#70180, but only *actually collects* `ty::Infer`s via `Ty::walk` into `stalled_on` (collecting `ty::ConstKind::Infer`s requires rust-lang#70164). However, it should be enough to handle rust-lang#70107's needs (WF obligations are stalled only on the outermost type/const being an inference variable, no `walk`-ing is involved). This is my second attempt, see rust-lang#70181 for the previous one, which unacceptably regressed perf. r? @nikomatsakis cc @nnethercote
EDIT: superseded by #70213 for performance reasons.
This PR addresses the representation side of #70180, but only actually collects
ty::Infers viaTy::walkintostalled_on(collectingty::ConstKind::Infers requires #70164).However, it should be enough to handle #70107's needs (WF obligations are stalled only on the outermost type/const being an inference variable, no
walk-ing is involved).This PR will make step-by-step changes in order to check the perf impact of each.
r? @nikomatsakis cc @nnethercote