Skip to content

Improve isDeeplyNestedType for homomorphic mapped types #56169

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

Merged
merged 2 commits into from
Oct 23, 2023
Merged

Conversation

ahejlsberg
Copy link
Member

This PR builds on #55638 to further improve tracking of deeply nested homomorphic mapped types. In particular, with this PR we handle "indirect" homomorphic mapped types like Pick, and we handle homomorphic mapped types applied to intersections.

Fixes #56138.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 21, 2023
@ahejlsberg
Copy link
Member Author

@typescript-bot test top100
@typescript-bot user test this
@typescript-bot run dt
@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 21, 2023

Heya @ahejlsberg, I've started to run the tsc-only perf test suite on this PR at bdf3ade. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 21, 2023

Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at bdf3ade. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 21, 2023

Heya @ahejlsberg, I've started to run the diff-based user code test suite on this PR at bdf3ade. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 21, 2023

Heya @ahejlsberg, I've started to run the diff-based top-repos suite on this PR at bdf3ade. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@ahejlsberg
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v18.15.0, x64)
Memory used 295,135k (± 0.01%) 295,084k (± 0.02%) ~ 294,995k 295,170k p=0.109 n=6
Parse Time 2.63s (± 0.64%) 2.63s (± 0.82%) ~ 2.60s 2.65s p=0.931 n=6
Bind Time 0.83s (± 0.66%) 0.83s (± 1.00%) ~ 0.83s 0.85s p=0.855 n=6
Check Time 8.06s (± 0.30%) 8.05s (± 0.22%) ~ 8.03s 8.08s p=0.255 n=6
Emit Time 7.05s (± 0.17%) 7.05s (± 0.30%) ~ 7.03s 7.09s p=0.680 n=6
Total Time 18.59s (± 0.12%) 18.56s (± 0.23%) ~ 18.52s 18.64s p=0.089 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 192,604k (± 1.56%) 193,549k (± 1.63%) ~ 190,646k 196,461k p=0.810 n=6
Parse Time 1.35s (± 1.19%) 1.34s (± 1.21%) ~ 1.32s 1.37s p=0.720 n=6
Bind Time 0.73s (± 0.00%) 0.73s (± 0.00%) ~ 0.73s 0.73s p=1.000 n=6
Check Time 9.16s (± 0.27%) 9.17s (± 0.18%) ~ 9.15s 9.19s p=0.625 n=6
Emit Time 2.64s (± 0.37%) 2.64s (± 0.31%) ~ 2.63s 2.65s p=0.604 n=6
Total Time 13.88s (± 0.20%) 13.88s (± 0.16%) ~ 13.86s 13.91s p=1.000 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,290k (± 0.00%) 347,306k (± 0.00%) ~ 347,288k 347,323k p=0.092 n=6
Parse Time 2.45s (± 0.52%) 2.47s (± 0.56%) ~ 2.45s 2.49s p=0.104 n=6
Bind Time 0.94s (± 0.43%) 0.94s (± 0.43%) ~ 0.93s 0.94s p=1.000 n=6
Check Time 6.91s (± 0.48%) 6.90s (± 0.43%) ~ 6.88s 6.95s p=0.572 n=6
Emit Time 4.03s (± 0.36%) 4.02s (± 0.31%) ~ 4.01s 4.04s p=0.187 n=6
Total Time 14.33s (± 0.21%) 14.32s (± 0.31%) ~ 14.28s 14.40s p=0.627 n=6
TFS - node (v18.15.0, x64)
Memory used 302,543k (± 0.00%) 302,552k (± 0.00%) ~ 302,541k 302,569k p=0.298 n=6
Parse Time 2.00s (± 0.49%) 2.00s (± 1.59%) ~ 1.96s 2.05s p=0.677 n=6
Bind Time 1.01s (± 1.08%) 1.00s (± 1.76%) ~ 0.98s 1.03s p=0.098 n=6
Check Time 6.23s (± 0.39%) 6.26s (± 0.46%) ~ 6.24s 6.32s p=0.106 n=6
Emit Time 3.55s (± 0.42%) 3.57s (± 0.49%) ~ 3.55s 3.60s p=0.247 n=6
Total Time 12.79s (± 0.05%) 12.83s (± 0.39%) ~ 12.76s 12.89s p=0.327 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,507k (± 0.01%) 470,501k (± 0.00%) ~ 470,479k 470,526k p=0.936 n=6
Parse Time 2.57s (± 0.20%) 2.59s (± 0.80%) ~ 2.56s 2.62s p=0.209 n=6
Bind Time 1.00s (± 0.41%) 1.00s (± 1.17%) ~ 0.99s 1.02s p=0.584 n=6
Check Time 16.64s (± 0.26%) 16.68s (± 0.21%) ~ 16.64s 16.73s p=0.196 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.22s (± 0.20%) 20.27s (± 0.23%) +0.05s (+ 0.25%) 20.19s 20.32s p=0.044 n=6
xstate - node (v18.15.0, x64)
Memory used 512,642k (± 0.01%) 512,604k (± 0.02%) ~ 512,519k 512,807k p=0.230 n=6
Parse Time 3.26s (± 0.50%) 3.26s (± 0.16%) ~ 3.26s 3.27s p=0.933 n=6
Bind Time 1.55s (± 0.26%) 1.55s (± 0.63%) ~ 1.53s 1.56s p=0.673 n=6
Check Time 2.88s (± 0.90%) 2.84s (± 0.72%) -0.04s (- 1.28%) 2.81s 2.86s p=0.040 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 7.76s (± 0.35%) 7.73s (± 0.23%) ~ 7.70s 7.75s p=0.062 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the user test suite comparing main and refs/pull/56169/merge:

There were infrastructure failures potentially unrelated to your change:

  • 3 instances of "Package install failed"
  • 1 instance of "Unknown failure"

Otherwise...

Everything looks good!

@typescript-bot
Copy link
Collaborator

Hey @ahejlsberg, the results of running the DT tests are ready.
Everything looks the same!
You can check the log here.

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the top-repos suite comparing main and refs/pull/56169/merge:

Everything looks good!

@ahejlsberg
Copy link
Member Author

Tests look good and performance is unaffected.

Copy link
Member

@RyanCavanaugh RyanCavanaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript ignoring checks for deeply nested computed object types
3 participants