-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Skip walking into param-env component if it has no placeholder/re-var #143500
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?
Skip walking into param-env component if it has no placeholder/re-var #143500
Conversation
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[perf] Skip walking into param-env component if it has no placeholder/re-var
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (e3ecd5f): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking 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. @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)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary 0.2%)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: 461.008s -> 461.232s (0.05%) |
r? lcnr |
@@ -1069,8 +1070,10 @@ where | |||
} else { | |||
ControlFlow::Continue(()) | |||
} | |||
} else { | |||
} else if ty.has_type_flags(TypeFlags::HAS_PLACEHOLDER | TypeFlags::HAS_RE_INFER) { |
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.
why only RE_INFER instead of full infer?
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.
bc we only care about infer regions in this folder's logic -- it would not even be necessary if we didn't replace free regions with infer
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.
why would we care about ty/ct infer for this folder anyways? 🤔
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.
we only care as in: there should never be infer types/consts in the param_env 😁 if we end up with a ty var for whatever reason, then this folder would start incorrectly treating (): Trait<?x>
as global evne though it shouldn't be. It currently detects ambiguous aliases in the env as global
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.
I don't see how that is the case and how this behavior would change with this fast path, given that visit_ty
does not care about infer types at all and because structurally_normalize_ty
just returns Ok(_)
for infer types.
Can you explain in more detail, because I am obviously missing something here?
Although it only provides a minor perf improvement, it seems like it could matter in more pathological cases.