Repository navigation
consider_impl_candidate tweaks - #165794
Conversation
It's not needed until much later.
It was duplicated from the one in `trait_goals.rs` but isn't needed. (And the corresponding `consider_impl_candidate` method in `normalizes_to.rs` doesn't have it.)
It's now repeated at two call sites instead of within three callees. Still not ideal, but an improvement.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
`consider_impl_candidate` tweaks
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (d8ae0af): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @bors rollup=iffy rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.0%, secondary -3.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 482.775s -> 482.692s (-0.02%) |
|
|
|
hi there! I like this, some trivial-ish refactors with a nice speed boost. Thanks! @bors r+ rollup=iffy perf |
…e, r=jdonszelmann `consider_impl_candidate` tweaks Cleans up the code a little. Also speeds up the new solver a bit, because putting the fast-reject tests (which almost always trigger an early return) before the calls to `consider_impl_candidate` avoids the cost of the function calls. r? @jdonszelmann
…uwer Rollup of 12 pull requests Successful merges: - #166340 (Revert "implement const Iterator for Range - #156216") - #165345 (Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At') - #165538 (Supertraits returns Unnormalized) - #165794 (`consider_impl_candidate` tweaks) - #160752 (Avoid inference constraints from opaque blanket impls) - #163187 (add `scalbn` and `ilogb` methods on floats) - #164541 (Add regression test for #152415) - #164543 (Add regression test for #151316) - #165920 (Introduce compute_abi helper and ComputeCallConv trait) - #166313 (Move `rustdoc-ui` tests in the right folder) - #166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index) - #166485 (Allow passing `--exact-match` and `--purge` to `x perf`)
Rollup merge of #165794 - nnethercote:consider_impl_candidate, r=jdonszelmann `consider_impl_candidate` tweaks Cleans up the code a little. Also speeds up the new solver a bit, because putting the fast-reject tests (which almost always trigger an early return) before the calls to `consider_impl_candidate` avoids the cost of the function calls. r? @jdonszelmann
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#166340 (Revert "implement const Iterator for Range - rust-lang/rust#156216") - rust-lang/rust#165345 (Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At') - rust-lang/rust#165538 (Supertraits returns Unnormalized) - rust-lang/rust#165794 (`consider_impl_candidate` tweaks) - rust-lang/rust#160752 (Avoid inference constraints from opaque blanket impls) - rust-lang/rust#163187 (add `scalbn` and `ilogb` methods on floats) - rust-lang/rust#164541 (Add regression test for rust-lang/rust#152415) - rust-lang/rust#164543 (Add regression test for rust-lang/rust#151316) - rust-lang/rust#165920 (Introduce compute_abi helper and ComputeCallConv trait) - rust-lang/rust#166313 (Move `rustdoc-ui` tests in the right folder) - rust-lang/rust#166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index) - rust-lang/rust#166485 (Allow passing `--exact-match` and `--purge` to `x perf`)
|
|
||
| ecx.probe_trait_candidate(CandidateSource::Impl(impl_def_id)).enter(|ecx| { | ||
| let impl_args = ecx.fresh_args_for_item(impl_def_id.into()); | ||
| ecx.record_impl_args(impl_args); |
There was a problem hiding this comment.
removing this feels like a bug 🤔 the fact that no diagnostics are affected here means that's an issue with our test suite
There was a problem hiding this comment.
InspectCandidate::instantiate_impl_args is the only place that acts on ProbeStep::RecordImplArgs. Can goals other than trait goals reach that path?
We could add the line back to be careful, but I'm not sure it's actually doing anything.
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#166340 (Revert "implement const Iterator for Range - rust-lang/rust#156216") - rust-lang/rust#165345 (Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At') - rust-lang/rust#165538 (Supertraits returns Unnormalized) - rust-lang/rust#165794 (`consider_impl_candidate` tweaks) - rust-lang/rust#160752 (Avoid inference constraints from opaque blanket impls) - rust-lang/rust#163187 (add `scalbn` and `ilogb` methods on floats) - rust-lang/rust#164541 (Add regression test for rust-lang/rust#152415) - rust-lang/rust#164543 (Add regression test for rust-lang/rust#151316) - rust-lang/rust#165920 (Introduce compute_abi helper and ComputeCallConv trait) - rust-lang/rust#166313 (Move `rustdoc-ui` tests in the right folder) - rust-lang/rust#166420 ([rustdoc] Fix search index generation: if crate content didn't change, it should generate the same search index) - rust-lang/rust#166485 (Allow passing `--exact-match` and `--purge` to `x perf`)
Cleans up the code a little. Also speeds up the new solver a bit, because putting the fast-reject tests (which almost always trigger an early return) before the calls to
consider_impl_candidateavoids the cost of the function calls.r? @jdonszelmann