-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rewrite representability #100720
Rewrite representability #100720
Conversation
r? @fee1-dead (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
Ope I'm getting a cycle error in an incremental test. Not sure how to fix that but I'm sure it has to do with my usage of Edit: Fixed with |
47219be
to
74b5ebb
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 74b5ebb844d94d9f73b616935db85fcf10cee785 with merge 44959bb541376c812edaad691a6f425d303af4cc... |
Why does the output change without |
@cjgillot IIUC, |
☀️ Try build successful - checks-actions |
Queued 44959bb541376c812edaad691a6f425d303af4cc with parent 8064a49, future comparison URL. |
Finished benchmarking commit (44959bb541376c812edaad691a6f425d303af4cc): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking 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 Footnotes |
Hmm is there some combination of query modifiers that might get the perf back? Or is my whole approach just flawed? |
r? compiler I'm not familiar enough with query code and representability to review this. |
By marking the query as IIUC, the only case a type is not representable, is when there is a cycle in its representation. I'd suggest a 2 step approach without global state:
Caching the graph traversal in 2 requires special support from the query system. I have a commit that would implement that, but I'm still trying to design what the API should look like. |
So you think we can cache non-acyclic query results? Sounds fun! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting a couple problems I found with my own code fwiw 😆
5285bb8
to
ab8509e
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit ab8509ee3eda951741269715e55855f5eadf4605 with merge 1a1e80337e2850a979b64f8fe9c654fbe79accf8... |
☀️ Try build successful - checks-actions |
Queued 1a1e80337e2850a979b64f8fe9c654fbe79accf8 with parent 01af504, future comparison URL. |
Finished benchmarking commit (1a1e80337e2850a979b64f8fe9c654fbe79accf8): 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)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
This comment has been minimized.
This comment has been minimized.
dca11ec
to
ff940db
Compare
Thanks @camsteffen for accepting to re-do it multiple times. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (bba9785): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression 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)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
Rewrite representability * Improve placement of `Box` in the suggestion * Multiple items in a cycle emit 1 error instead of an error for each item in the cycle * Introduce `representability` query to avoid traversing an item every time it is used. * Also introduce `params_in_repr` query to avoid traversing generic items every time it is used.
Box
in the suggestionrepresentability
query to avoid traversing an item every time it is used.params_in_repr
query to avoid traversing generic items every time it is used.