Skip to content

Hoist and distribute type parameter constraints over type parameters … #33453

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

Conversation

weswigham
Copy link
Member

…when comparing against union targets when fetching union constraints

Fixes #33340

The error baseline changes are because I disabled the redundant error info pyramids from the distributive constraint error - I'd only really want to add them back in if I changed them to dedent like overload errors, since as-is they didn't really flow.

…when comparing against union targets when fetching union constraints
Copy link
Collaborator

@jack-williams jack-williams left a comment

Choose a reason for hiding this comment

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

Looks good; sorry for the quibbles. Should probably read my approval as a no-op and get @ahejlsberg to give it the OK.

@weswigham
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 18, 2019

Heya @weswigham, I've started to run the perf test suite on this PR at 5c38f6a. You can monitor the build here. It should now contribute to this PR's status checks.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..33453

Metric master 33453 Delta Best Worst
Angular - node (v12.1.0, x64)
Memory used 331,247k (± 0.02%) 331,679k (± 0.02%) +433k (+ 0.13%) 331,539k 331,798k
Parse Time 1.56s (± 0.49%) 1.56s (± 0.62%) +0.00s (+ 0.26%) 1.54s 1.58s
Bind Time 0.78s (± 0.67%) 0.78s (± 0.67%) +0.00s (+ 0.26%) 0.77s 0.79s
Check Time 4.24s (± 0.29%) 4.27s (± 0.62%) +0.03s (+ 0.59%) 4.21s 4.33s
Emit Time 5.24s (± 0.59%) 5.26s (± 0.85%) +0.02s (+ 0.44%) 5.19s 5.37s
Total Time 11.82s (± 0.31%) 11.87s (± 0.55%) +0.05s (+ 0.46%) 11.75s 12.05s
Monaco - node (v12.1.0, x64)
Memory used 346,012k (± 0.01%) 345,947k (± 0.02%) -66k (- 0.02%) 345,821k 346,173k
Parse Time 1.22s (± 0.69%) 1.22s (± 0.77%) +0.00s (+ 0.16%) 1.21s 1.25s
Bind Time 0.67s (± 0.73%) 0.68s (± 0.59%) +0.00s (+ 0.74%) 0.67s 0.69s
Check Time 4.26s (± 0.43%) 4.25s (± 0.55%) -0.02s (- 0.42%) 4.19s 4.31s
Emit Time 2.85s (± 0.61%) 2.83s (± 0.44%) -0.02s (- 0.53%) 2.80s 2.86s
Total Time 9.01s (± 0.35%) 8.98s (± 0.32%) -0.03s (- 0.29%) 8.91s 9.04s
TFS - node (v12.1.0, x64)
Memory used 301,406k (± 0.02%) 301,449k (± 0.02%) +43k (+ 0.01%) 301,297k 301,580k
Parse Time 0.95s (± 0.58%) 0.95s (± 0.99%) +0.00s (+ 0.11%) 0.94s 0.97s
Bind Time 0.63s (± 1.84%) 0.62s (± 0.72%) -0.01s (- 0.80%) 0.61s 0.63s
Check Time 3.85s (± 0.50%) 3.86s (± 0.66%) +0.02s (+ 0.42%) 3.82s 3.93s
Emit Time 2.95s (± 0.67%) 2.95s (± 0.70%) 0.00s ( 0.00%) 2.91s 3.00s
Total Time 8.38s (± 0.26%) 8.39s (± 0.42%) +0.01s (+ 0.14%) 8.29s 8.47s
Angular - node (v8.9.0, x64)
Memory used 350,130k (± 0.02%) 350,473k (± 0.01%) +343k (+ 0.10%) 350,344k 350,575k
Parse Time 2.10s (± 0.48%) 2.09s (± 0.29%) -0.01s (- 0.38%) 2.08s 2.11s
Bind Time 0.83s (± 0.60%) 0.84s (± 0.53%) +0.00s (+ 0.36%) 0.83s 0.85s
Check Time 5.10s (± 0.50%) 5.07s (± 0.36%) -0.03s (- 0.61%) 5.03s 5.12s
Emit Time 5.94s (± 1.49%) 5.96s (± 1.87%) +0.02s (+ 0.30%) 5.56s 6.17s
Total Time 13.98s (± 0.75%) 13.97s (± 0.88%) -0.01s (- 0.08%) 13.53s 14.21s
Monaco - node (v8.9.0, x64)
Memory used 363,721k (± 0.02%) 363,721k (± 0.01%) -0k (- 0.00%) 363,643k 363,807k
Parse Time 1.56s (± 0.47%) 1.56s (± 0.32%) -0.01s (- 0.38%) 1.54s 1.56s
Bind Time 0.89s (± 0.77%) 0.88s (± 0.86%) -0.00s (- 0.23%) 0.87s 0.90s
Check Time 5.04s (± 1.01%) 5.08s (± 1.36%) +0.04s (+ 0.71%) 4.99s 5.26s
Emit Time 3.28s (± 2.79%) 3.20s (± 4.36%) -0.08s (- 2.56%) 2.91s 3.33s
Total Time 10.78s (± 0.50%) 10.72s (± 0.80%) -0.06s (- 0.52%) 10.51s 10.86s
TFS - node (v8.9.0, x64)
Memory used 317,623k (± 0.01%) 317,693k (± 0.01%) +70k (+ 0.02%) 317,625k 317,809k
Parse Time 1.26s (± 0.63%) 1.26s (± 0.78%) 0.00s ( 0.00%) 1.24s 1.29s
Bind Time 0.70s (± 5.69%) 0.68s (± 4.76%) -0.02s (- 2.15%) 0.65s 0.78s
Check Time 4.43s (± 0.91%) 4.45s (± 1.20%) +0.01s (+ 0.29%) 4.28s 4.51s
Emit Time 3.05s (± 0.87%) 3.04s (± 0.84%) -0.00s (- 0.16%) 2.98s 3.09s
Total Time 9.44s (± 0.39%) 9.44s (± 0.43%) -0.00s (- 0.05%) 9.36s 9.53s
Angular - node (v8.9.0, x86)
Memory used 198,212k (± 0.01%) 198,376k (± 0.01%) +164k (+ 0.08%) 198,321k 198,416k
Parse Time 2.03s (± 0.52%) 2.04s (± 0.75%) +0.00s (+ 0.20%) 2.02s 2.08s
Bind Time 0.95s (± 0.52%) 0.95s (± 0.61%) +0.00s (+ 0.42%) 0.94s 0.96s
Check Time 4.64s (± 0.65%) 4.64s (± 0.45%) +0.00s (+ 0.06%) 4.60s 4.70s
Emit Time 5.66s (± 0.73%) 5.66s (± 1.07%) -0.00s (- 0.07%) 5.60s 5.90s
Total Time 13.29s (± 0.43%) 13.29s (± 0.44%) +0.01s (+ 0.04%) 13.21s 13.49s
Monaco - node (v8.9.0, x86)
Memory used 203,260k (± 0.01%) 203,248k (± 0.02%) -12k (- 0.01%) 203,155k 203,336k
Parse Time 1.62s (± 0.85%) 1.63s (± 1.18%) +0.01s (+ 0.56%) 1.60s 1.68s
Bind Time 0.72s (± 0.72%) 0.72s (± 1.11%) +0.00s (+ 0.14%) 0.71s 0.74s
Check Time 4.85s (± 0.52%) 4.90s (± 0.76%) +0.05s (+ 0.95%) 4.82s 5.01s
Emit Time 3.15s (± 0.49%) 3.17s (± 0.67%) +0.01s (+ 0.41%) 3.12s 3.21s
Total Time 10.34s (± 0.37%) 10.41s (± 0.49%) +0.07s (+ 0.66%) 10.29s 10.56s
TFS - node (v8.9.0, x86)
Memory used 178,567k (± 0.02%) 178,573k (± 0.02%) +6k (+ 0.00%) 178,476k 178,669k
Parse Time 1.31s (± 0.69%) 1.31s (± 0.63%) -0.00s (- 0.31%) 1.29s 1.33s
Bind Time 0.64s (± 1.80%) 0.64s (± 0.63%) -0.01s (- 0.93%) 0.63s 0.65s
Check Time 4.29s (± 0.87%) 4.28s (± 0.47%) -0.01s (- 0.19%) 4.25s 4.33s
Emit Time 2.85s (± 1.56%) 2.88s (± 1.00%) +0.03s (+ 1.05%) 2.82s 2.94s
Total Time 9.10s (± 0.59%) 9.10s (± 0.42%) +0.01s (+ 0.09%) 9.02s 9.20s
Angular - node (v9.0.0, x64)
Memory used 349,790k (± 0.02%) 350,138k (± 0.01%) +348k (+ 0.10%) 350,072k 350,214k
Parse Time 1.82s (± 0.57%) 1.83s (± 0.30%) +0.01s (+ 0.55%) 1.82s 1.84s
Bind Time 0.77s (± 0.64%) 0.78s (± 0.44%) +0.00s (+ 0.39%) 0.77s 0.78s
Check Time 4.87s (± 0.52%) 4.87s (± 0.64%) -0.01s (- 0.14%) 4.82s 4.95s
Emit Time 5.79s (± 0.62%) 5.80s (± 0.43%) +0.02s (+ 0.28%) 5.74s 5.85s
Total Time 13.25s (± 0.31%) 13.27s (± 0.30%) +0.02s (+ 0.16%) 13.19s 13.39s
Monaco - node (v9.0.0, x64)
Memory used 363,458k (± 0.02%) 363,521k (± 0.03%) +62k (+ 0.02%) 363,281k 363,768k
Parse Time 1.31s (± 0.51%) 1.32s (± 0.38%) +0.00s (+ 0.15%) 1.30s 1.32s
Bind Time 0.83s (± 1.27%) 0.83s (± 1.27%) -0.00s (- 0.12%) 0.81s 0.85s
Check Time 4.95s (± 1.81%) 5.00s (± 1.47%) +0.06s (+ 1.17%) 4.88s 5.13s
Emit Time 3.21s (± 5.16%) 3.16s (± 5.61%) -0.05s (- 1.56%) 2.84s 3.39s
Total Time 10.30s (± 0.87%) 10.31s (± 1.19%) +0.01s (+ 0.10%) 10.08s 10.53s
TFS - node (v9.0.0, x64)
Memory used 317,456k (± 0.02%) 317,457k (± 0.01%) +1k (+ 0.00%) 317,333k 317,532k
Parse Time 1.04s (± 0.45%) 1.04s (± 0.43%) -0.00s (- 0.19%) 1.03s 1.05s
Bind Time 0.62s (± 0.76%) 0.62s (± 0.84%) +0.00s (+ 0.16%) 0.61s 0.63s
Check Time 4.38s (± 0.46%) 4.39s (± 0.46%) +0.00s (+ 0.11%) 4.36s 4.45s
Emit Time 3.17s (± 1.45%) 3.18s (± 0.66%) +0.01s (+ 0.19%) 3.13s 3.22s
Total Time 9.21s (± 0.53%) 9.23s (± 0.42%) +0.01s (+ 0.14%) 9.14s 9.33s
Angular - node (v9.0.0, x86)
Memory used 198,324k (± 0.02%) 198,504k (± 0.03%) +181k (+ 0.09%) 198,423k 198,671k
Parse Time 1.73s (± 0.56%) 1.73s (± 0.62%) +0.00s (+ 0.12%) 1.71s 1.76s
Bind Time 0.90s (± 0.67%) 0.90s (± 0.94%) +0.00s (+ 0.45%) 0.88s 0.92s
Check Time 4.34s (± 0.48%) 4.35s (± 0.50%) +0.00s (+ 0.07%) 4.29s 4.38s
Emit Time 5.54s (± 0.72%) 5.54s (± 0.96%) +0.00s (+ 0.05%) 5.44s 5.64s
Total Time 12.50s (± 0.32%) 12.51s (± 0.56%) +0.01s (+ 0.07%) 12.34s 12.66s
Monaco - node (v9.0.0, x86)
Memory used 203,299k (± 0.02%) 203,324k (± 0.01%) +25k (+ 0.01%) 203,264k 203,383k
Parse Time 1.34s (± 0.56%) 1.35s (± 0.83%) +0.00s (+ 0.15%) 1.33s 1.37s
Bind Time 0.64s (± 0.90%) 0.64s (± 1.48%) +0.00s (+ 0.16%) 0.63s 0.68s
Check Time 4.67s (± 0.40%) 4.68s (± 0.50%) +0.00s (+ 0.06%) 4.62s 4.73s
Emit Time 3.07s (± 0.40%) 3.08s (± 0.72%) +0.01s (+ 0.39%) 3.03s 3.12s
Total Time 9.73s (± 0.30%) 9.75s (± 0.29%) +0.02s (+ 0.18%) 9.71s 9.83s
TFS - node (v9.0.0, x86)
Memory used 178,618k (± 0.02%) 178,619k (± 0.02%) +2k (+ 0.00%) 178,553k 178,715k
Parse Time 1.06s (± 0.95%) 1.06s (± 1.18%) -0.00s (- 0.09%) 1.04s 1.10s
Bind Time 0.58s (± 0.69%) 0.57s (± 0.65%) -0.00s (- 0.69%) 0.57s 0.58s
Check Time 4.14s (± 0.47%) 4.15s (± 0.55%) +0.01s (+ 0.22%) 4.08s 4.19s
Emit Time 2.79s (± 1.00%) 2.77s (± 0.71%) -0.02s (- 0.75%) 2.73s 2.81s
Total Time 8.58s (± 0.28%) 8.57s (± 0.43%) -0.01s (- 0.13%) 8.49s 8.65s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-161-generic
Architecturex64
Available Memory16 GB
Available Memory9 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
  • node (v9.0.0, x64)
  • node (v9.0.0, x86)
Scenarios
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Angular - node (v9.0.0, x64)
  • Angular - node (v9.0.0, x86)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • Monaco - node (v9.0.0, x64)
  • Monaco - node (v9.0.0, x86)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • TFS - node (v9.0.0, x64)
  • TFS - node (v9.0.0, x86)
Benchmark Name Iterations
Current 33453 10
Baseline master 10

@weswigham
Copy link
Member Author

@ahejlsberg perf here is fine, any other comments, questions, or concerns?

@weswigham
Copy link
Member Author

Just because while I feel it's probably OK, we should probably do this on relationship/inference changes for diligence (and I don't want to deal with breaks tomorrow if there are any, and would rather deal with them now):

@typescript-bot run dt
@typescript-bot user test this
@typescript-bot test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 23, 2019

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at 5c38f6a. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 23, 2019

Heya @weswigham, I've started to run the extended test suite on this PR at 5c38f6a. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 23, 2019

Heya @weswigham, I've started to run the parallelized community code test suite on this PR at 5c38f6a. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@weswigham
Copy link
Member Author

Excellent, DT is clean and the others are expected given the last merge date on this PR.

@weswigham weswigham merged commit 367b820 into microsoft:master Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Value of type T is not assignable to T & U even when T extends U
4 participants