-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Add a fastpath for comparing common mapped types like Pick
which avoids manufacturing intermediate type identities
#39696
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
Add a fastpath for comparing common mapped types like Pick
which avoids manufacturing intermediate type identities
#39696
Conversation
…ds manufacturing intermediate type identities
@typescript-bot test this |
Heya @weswigham, I've started to run the extended test suite on this PR at 310836e. You can monitor the build here. |
Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at 310836e. You can monitor the build here. |
Heya @weswigham, I've started to run the perf test suite on this PR at 310836e. You can monitor the build here. Update: The results are in! |
Heya @weswigham, I've started to run the parallelized community code test suite on this PR at 310836e. You can monitor the build here. |
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
@weswigham Here they are:Comparison Report - master..39696
System
Hosts
Scenarios
|
Perf looks good (potentially a small gain in material ui). Other suites are either passing or existing diffs. @typescript-bot pack this |
Heya @weswigham, I've started to run the tarball bundle task on this PR at 310836e. You can monitor the build here. |
Hey @weswigham, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build. |
@nscarcella you wanna try this PR build to verify that if fixes your actual code? |
For the simplified model described in #39678 these changes reduce the amount of types from 521712(6.59s) to 404755(4.60s). Can't currently test it on the whole model because we can't update the TypeScript version due to this other issue. |
Fixes #39678
This reduces the cost of the
copy
method in #39678 from 3s to 0.3s (on my machine, at least). In harder numbers, the fastpath brings the type count in the example given in #39678 from 402k types manufactured during compilation down to 27k types (compared to 19k types without thecopy
method at all).