-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Fix perf regression from TypeVisitor changes #101893
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit cf6366b with merge f68409c5eea19c71665bc0c07038879c68413d11... |
☀️ Try build successful - checks-actions |
Queued f68409c5eea19c71665bc0c07038879c68413d11 with parent 22f6aec, future comparison URL. |
Finished benchmarking commit (f68409c5eea19c71665bc0c07038879c68413d11): 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 |
r? @lcnr turns out generalizing the &List impls for TypeVisitor is a perf problem. I can investigate further, but maybe let's just revert for now |
is it only the |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 18ab705 with merge cf14103f0c80a2a2abd96c44f71d6c855b27fa23... |
☀️ Try build successful - checks-actions |
Queued cf14103f0c80a2a2abd96c44f71d6c855b27fa23 with parent 503e19d, future comparison URL. |
Finished benchmarking commit (cf14103f0c80a2a2abd96c44f71d6c855b27fa23): comparison URL. Overall result: ❌✅ regressions and improvements - 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. 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)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 |
The deeply nested benchmark regresses even further with this change. But the diesel benchmark is unaffected. So we can get both the perf regression fixed in the regular case and get checking of CanonicalVarInfo |
so now all of the 5 functions are exactly the same so its really weird how that can have worse perf than just using 1 generic function, is the difference because of inlining decisions? 🤔 regressions to |
Making it generic gives us access to the MIR, so inlining can now happen across crates, where it wasn't possible before. But just for completeness I'll do some more experiments. @bors try @rust-timer queue include=diesel,deeply-nested-multi |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
@rust-timer build 7eecd77bc8dd1ade7b4d10cdb244db88238a7c78 include=diesel,deeply-nested-multi |
Queued 7eecd77bc8dd1ade7b4d10cdb244db88238a7c78 with parent acb8934, future comparison URL. |
The try build didn't succeed, so this queue won't work (and actually stalls the collector today, though we should fix that0. @bors try
|
⌛ Trying commit f841f1b with merge 549a91bb3ca412725a8d26f84b033d74be3bca68... |
☀️ Try build successful - checks-actions |
@rust-timer build 549a91bb3ca412725a8d26f84b033d74be3bca68 include=diesel,deeply-nested-multi |
Queued 549a91bb3ca412725a8d26f84b033d74be3bca68 with parent 1de00d1, future comparison URL. |
Finished benchmarking commit (549a91bb3ca412725a8d26f84b033d74be3bca68): 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. Footnotes |
Only the original PR gives us both diesel and deeply-nested perf improvements. |
But considering this is a bugfix that simply has to do more work @rustbot ready |
r=me with updated pr title 😁 |
@bors r=lcnr |
☀️ Test successful - checks-actions |
Finished benchmarking commit (9f1a21a): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @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.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
keccak has been noisy lately. @rustbot label: +perf-regression-triaged |
Regression occurred in #101858 (comment)
Instead of just reverting, we only fixed part of the regression. The main regression was due to actually correctly visiting a type that contains types and consts and should therefor be visited. This is not actually observable (yet?), but we should still do it correctly instead of risking major bugs in the future.