Avoid doing redundant work in receiver_is_valid#127473
Avoid doing redundant work in receiver_is_valid#127473compiler-errors wants to merge 3 commits intorust-lang:masterfrom
receiver_is_valid#127473Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…, r=<try> Revert "Rework receiver_is_valid" This reverts commit 465e7d5. Testing perf: rust-lang#127172 (comment) r? `@ghost`
| } | ||
|
|
||
| // The first type is `receiver_ty`, which we know its not equal to `self_ty`; skip it. | ||
| autoderef.next(); |
There was a problem hiding this comment.
This autoderef may have been load-bearing, since we're doing >1 equate per method even though we tested the receiver was equal above.
| // Register the bound, in case it has any region side-effects. | ||
| wfcx.register_bound( | ||
| cause.clone(), | ||
| wfcx.param_env, | ||
| potential_self_ty, | ||
| receiver_trait_def_id, | ||
| ); |
There was a problem hiding this comment.
This may have been perf negative, since we now have trait goals to process... If this is the problem, then we probably need to accept this for soundness reasons if we ever want to stabilize receiver lol
There was a problem hiding this comment.
so this means we only check T: Receiver ignoring regions? 🤔
There was a problem hiding this comment.
As we were previously. Let me try adding it back and seeing what happens still...
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (1f9fc8f): comparison URL. Overall result: ❌✅ regressions and improvements - BENCHMARK(S) FAILEDBenchmarking 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 may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never ❗ ❗ ❗ ❗ ❗
Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (primary 2.9%, secondary 3.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: missing data |
|
OK let me try my theories |
355ef6b to
ae938b0
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…, r=<try> Revert "Rework receiver_is_valid" This reverts commit 465e7d5. Testing perf: rust-lang#127172 (comment) r? `@ghost`
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (087de49): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking 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 may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 701.456s -> 702s (0.08%) |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…, r=<try> Revert "Rework receiver_is_valid" This reverts commit 465e7d5. Testing perf: rust-lang#127172 (comment) r? `@ghost`
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (6c0f300): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking 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 may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 1.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary -2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 700.067s -> 702.579s (0.36%) |
receiver_is_valid
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…, r=<try> Avoid doing redundant work in `receiver_is_valid` Avoids a redundant `eq` call to restore perf.
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (3b4d3cf): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking 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 may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 2.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 700.14s -> 700.55s (0.06%) |
|
Ok yeah, it really is confirming the trait goal which is the problem. I don't think we should do this -- actually having lifetime outputs from our goals is important for WF :> |
Avoids a redundant
eqcall to restore perf.