-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Constraint solver] Remove performance hacks for pattern type computation #29851
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
[Constraint solver] Remove performance hacks for pattern type computation #29851
Conversation
…tion. We shouldn't need these.
@swift-ci please smoke test |
@swift-ci please test source compatibility |
@swift-ci please test compiler performance |
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.
🎉
Compilation-performance test failed |
@swift-ci please test Linux |
@swift-ci please smoke test compiler performance |
Compilation-performance test failed |
@swift-ci please test compiler performance |
This is getting folded into #29855 but I'm trying to get performance numbers out of it first. |
Compilation-performance test failed |
@swift-ci please test compiler performance |
Compilation-performance test failed |
@swift-ci please test compiler performance |
if (ty && ty->getOptionalObjectType()) | ||
return ty; // Already Optional<T>. |
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.
Hi @DougGregor – Why is this a "performance hack"? Avoiding a type variable when the user has properly typed the pattern is good, no?
EDIT – Oh wait, this is a named pattern, not a typed pattern, so this code would never trigger, right?
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.
It's a named pattern; it would only trigger if we've already figured out the type somehow and that type is optional. I suspect that's "never".
We shouldn't need these.