-
Notifications
You must be signed in to change notification settings - Fork 13.7k
eagerly compute sub_relations
again
#140375
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
base: master
Are you sure you want to change the base?
Conversation
cb71df2
to
a0fef49
Compare
This comment has been minimized.
This comment has been minimized.
a0fef49
to
46487b0
Compare
This comment has been minimized.
This comment has been minimized.
46487b0
to
54a32a1
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
eagerly compute `sub_relations` again We still only using them for diagnostics with the old solver. We could use them for cycle detection in generalization and it seems desirable to do so in the future. However, this is unsound with the old trait solver as its cache does not track these `sub_relations` in any way. We would also need to consider them when canonicalizing as otherwise instantiating the canonical response may fail. Necessary for type inference guidance due to not-yet defined opaque types, cc rust-lang/trait-system-refactor-initiative#182. r? `@compiler-errors`
611d7ae
to
26f4ee0
Compare
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
eagerly compute `sub_relations` again We still only using them for diagnostics with the old solver. We could use them for cycle detection in generalization and it seems desirable to do so in the future. However, this is unsound with the old trait solver as its cache does not track these `sub_relations` in any way. We would also need to consider them when canonicalizing as otherwise instantiating the canonical response may fail. Necessary for type inference guidance due to not-yet defined opaque types, cc rust-lang/trait-system-refactor-initiative#182. r? `@compiler-errors`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (e184142): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking 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 the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.6%, secondary -4.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 (primary 0.0%, secondary -1.6%)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: 765.701s -> 765.069s (-0.08%) |
26f4ee0
to
c629527
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #140474) made this pull request unmergeable. Please resolve the merge conflicts. |
see perf run in #140480 (comment) |
comparing these two perf runs, tracking sub_relations in canonical inputs does slightly worsen performance: https://perf.rust-lang.org/compare.html?start=e1841428183d264d2f48328b3de5c0f25654315a&end=9613271ee15ea18ed41f396fc7aaf4c1f760410a&stat=instructions%3Au |
51a0c95
to
970a01b
Compare
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (3f24acc): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.2%, secondary -0.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 466.752s -> 466.953s (0.04%) |
☔ The latest upstream changes (presumably #145923) made this pull request unmergeable. Please resolve the merge conflicts. |
970a01b
to
fcab000
Compare
This comment has been minimized.
This comment has been minimized.
given the number of changes in the last days I'll switch to waiting on author. switch back when you want a review @rustbot author |
I want a review |
fcab000
to
f84f3f6
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
We still only using them for diagnostics right now. This mostly reverts #119989. Necessary for type inference guidance due to not-yet defined opaque types, cc rust-lang/trait-system-refactor-initiative#182.
We could use them for cycle detection in generalization and it seems desirable to do so in the future. However, this is unsound with the old trait solver as its cache does not track these
sub_relations
in any way.We now properly track the
sub_relations
when canonicalizing so using them in the new solver is totally sound and the performance impact is far more manageable than I thought back in #119989.r? @compiler-errors