-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Less template literal and string literal reduction #56165
base: main
Are you sure you want to change the base?
Conversation
@typescript-bot test this |
@typescript-bot test this I don't think you're on the author list so that doesn't work, though maybe it's some other list that does it. |
Heya @jakebailey, I've started to run the regular perf test suite on this PR at 8e76d16. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at 8e76d16. You can monitor the build here. Update: The results are in! |
What test case are you looking at for this? #52345? |
Updated comment. It's #56081 |
@jakebailey Here are the results of running the user test suite comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Everything looks good! |
@jakebailey Here they are:
CompilerComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
tsserverComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
StartupComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
…ranas/template-literal-reduction
So this is not the solution since this was an intentional feature introduced in #41276. But I think there should probably be some middle ground between reducing eagerly during union creation and lazily when subtype reduction is performed. Maybe just doing subtype reduction when checking variable declaration nodes? |
The main problem is that if we don't always reduce, then two unions that are actually the same thing can be present at once, which means you can't fast check for equality and such (maybe some other invariants). |
Checking perf impact of the naive change.
Fixes #56081