Skip to content
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

Unwrap substitutions both before _and_ after potential simplification #32116

Merged

Conversation

weswigham
Copy link
Member

Fixes #31804

The prophecized bug from when we added conditional simplification has come to pass, thus we must decide: Do we continue being naive and just apply a second unwrap step (as I have added here), or do we complicate the unwrapping/simplifying a bit more to guarantee that we always get the final maximally unwrapped/simplified type (as was originally in the conditional simplification PR).

@weswigham
Copy link
Member Author

reping @ahejlsberg ❤️

src/compiler/checker.ts Outdated Show resolved Hide resolved
@weswigham weswigham force-pushed the unwrap-substitutes-post-simplification branch from 1d13804 to 3b28100 Compare August 19, 2019 18:35
@weswigham
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 19, 2019

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 19, 2019

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 19, 2019

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at e501cc9. 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.

if (target.flags & TypeFlags.Simplifiable) {
target = getSimplifiedType(target, /*writing*/ true);
while (true) {
const s = source.flags & TypeFlags.Substitution ? source = (<SubstitutionType>source).substitute :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it ever be worth updating substitute in-place to collapse multiple links down to one?

Copy link
Member Author

@weswigham weswigham Sep 24, 2019

Choose a reason for hiding this comment

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

I don't think we can (or at least not usefully) - the associated typeVariable of nested SubstitutionTypes can (and most often does) differ. ie, a T substituted with T & U where U is substituted with U & string - while here we want to fully flatten, in other situations I think we want to keep the knowledge of what variables expanded to what. Multiple nested conditionals affecting the same type variable are already merged pre-substitute creation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right; I forgot that these are more like narrowings rather than unification substitutions.

@weswigham
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 24, 2019

Heya @weswigham, I've started to run the parallelized community code test suite on this PR at 271187f. 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 24, 2019

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at 271187f. 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 24, 2019

Heya @weswigham, I've started to run the extended test suite on this PR at 271187f. 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 24, 2019

Heya @weswigham, I've started to run the perf test suite on this PR at 271187f. 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

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

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..32116

Metric master 32116 Delta Best Worst
Angular - node (v12.1.0, x64)
Memory used 329,808k (± 0.04%) 332,050k (± 0.02%) +2,242k (+ 0.68%) 331,840k 332,190k
Parse Time 1.57s (± 0.80%) 1.56s (± 0.29%) -0.01s (- 0.57%) 1.55s 1.57s
Bind Time 0.79s (± 0.60%) 0.81s (± 0.42%) +0.02s (+ 2.54%) 0.80s 0.81s
Check Time 4.27s (± 0.59%) 4.38s (± 0.41%) +0.11s (+ 2.57%) 4.35s 4.43s
Emit Time 5.27s (± 0.81%) 5.27s (± 0.33%) -0.00s (- 0.04%) 5.21s 5.29s
Total Time 11.90s (± 0.47%) 12.03s (± 0.25%) +0.12s (+ 1.02%) 11.94s 12.09s
Monaco - node (v12.1.0, x64)
Memory used 344,691k (± 0.01%) 346,954k (± 0.01%) +2,263k (+ 0.66%) 346,886k 347,038k
Parse Time 1.23s (± 0.57%) 1.22s (± 0.73%) -0.01s (- 0.57%) 1.21s 1.25s
Bind Time 0.68s (± 0.88%) 0.68s (± 0.72%) +0.01s (+ 1.18%) 0.67s 0.69s
Check Time 4.27s (± 0.49%) 4.39s (± 0.27%) +0.12s (+ 2.86%) 4.36s 4.41s
Emit Time 2.87s (± 0.50%) 2.88s (± 0.67%) +0.01s (+ 0.28%) 2.84s 2.92s
Total Time 9.05s (± 0.40%) 9.18s (± 0.25%) +0.13s (+ 1.46%) 9.13s 9.23s
TFS - node (v12.1.0, x64)
Memory used 300,112k (± 0.02%) 303,643k (± 0.02%) +3,531k (+ 1.18%) 303,555k 303,759k
Parse Time 0.96s (± 0.78%) 0.95s (± 0.78%) -0.01s (- 1.35%) 0.94s 0.97s
Bind Time 0.62s (± 0.79%) 0.64s (± 1.20%) +0.01s (+ 1.76%) 0.62s 0.66s
Check Time 3.80s (± 0.58%) 3.99s (± 0.49%) +0.19s (+ 4.97%) 3.95s 4.04s
Emit Time 2.97s (± 0.93%) 2.96s (± 0.95%) -0.01s (- 0.30%) 2.90s 3.05s
Total Time 8.36s (± 0.53%) 8.54s (± 0.50%) +0.18s (+ 2.14%) 8.47s 8.67s
Angular - node (v8.9.0, x64)
Memory used 348,522k (± 0.01%) 350,702k (± 0.01%) +2,180k (+ 0.63%) 350,635k 350,776k
Parse Time 2.11s (± 0.69%) 2.11s (± 0.49%) -0.00s (- 0.09%) 2.08s 2.13s
Bind Time 0.84s (± 0.66%) 0.85s (± 1.09%) +0.01s (+ 1.19%) 0.83s 0.87s
Check Time 5.11s (± 0.49%) 5.25s (± 0.49%) +0.14s (+ 2.80%) 5.21s 5.32s
Emit Time 6.00s (± 1.41%) 6.01s (± 0.85%) +0.02s (+ 0.27%) 5.92s 6.13s
Total Time 14.05s (± 0.64%) 14.22s (± 0.45%) +0.16s (+ 1.15%) 14.11s 14.37s
Monaco - node (v8.9.0, x64)
Memory used 362,283k (± 0.01%) 364,630k (± 0.02%) +2,347k (+ 0.65%) 364,488k 364,755k
Parse Time 1.56s (± 0.38%) 1.57s (± 0.57%) +0.00s (+ 0.06%) 1.55s 1.59s
Bind Time 0.89s (± 0.63%) 0.89s (± 0.41%) +0.01s (+ 0.79%) 0.89s 0.90s
Check Time 5.16s (± 1.01%) 5.21s (± 0.45%) +0.05s (+ 0.97%) 5.16s 5.27s
Emit Time 3.22s (± 4.41%) 3.33s (± 0.77%) +0.11s (+ 3.48%) 3.28s 3.39s
Total Time 10.83s (± 0.92%) 11.00s (± 0.33%) +0.18s (+ 1.63%) 10.91s 11.08s
TFS - node (v8.9.0, x64)
Memory used 316,163k (± 0.02%) 319,865k (± 0.01%) +3,701k (+ 1.17%) 319,757k 319,917k
Parse Time 1.26s (± 0.62%) 1.26s (± 0.41%) +0.00s (+ 0.16%) 1.25s 1.27s
Bind Time 0.70s (± 5.67%) 0.73s (± 6.91%) +0.03s (+ 3.71%) 0.66s 0.83s
Check Time 4.40s (± 1.55%) 4.56s (± 1.54%) +0.17s (+ 3.77%) 4.36s 4.70s
Emit Time 3.06s (± 0.78%) 3.11s (± 0.45%) +0.04s (+ 1.44%) 3.07s 3.14s
Total Time 9.42s (± 0.46%) 9.66s (± 0.54%) +0.24s (+ 2.52%) 9.54s 9.79s
Angular - node (v8.9.0, x86)
Memory used 197,383k (± 0.02%) 198,550k (± 0.02%) +1,167k (+ 0.59%) 198,465k 198,609k
Parse Time 2.04s (± 0.47%) 2.05s (± 1.15%) +0.02s (+ 0.74%) 2.01s 2.12s
Bind Time 0.96s (± 0.98%) 0.97s (± 0.68%) +0.01s (+ 1.36%) 0.96s 0.99s
Check Time 4.65s (± 0.45%) 4.78s (± 0.54%) +0.13s (+ 2.77%) 4.72s 4.85s
Emit Time 5.72s (± 0.99%) 5.73s (± 1.09%) +0.01s (+ 0.23%) 5.63s 5.90s
Total Time 13.36s (± 0.42%) 13.53s (± 0.61%) +0.17s (+ 1.29%) 13.39s 13.74s
Monaco - node (v8.9.0, x86)
Memory used 202,468k (± 0.02%) 203,772k (± 0.03%) +1,304k (+ 0.64%) 203,650k 203,869k
Parse Time 1.61s (± 0.62%) 1.62s (± 0.75%) +0.01s (+ 0.75%) 1.60s 1.64s
Bind Time 0.72s (± 0.94%) 0.71s (± 0.51%) -0.01s (- 1.38%) 0.71s 0.72s
Check Time 4.94s (± 0.57%) 5.04s (± 1.09%) +0.10s (+ 1.96%) 4.96s 5.23s
Emit Time 3.15s (± 0.70%) 3.14s (± 1.58%) -0.02s (- 0.54%) 3.00s 3.19s
Total Time 10.42s (± 0.38%) 10.51s (± 0.38%) +0.09s (+ 0.83%) 10.42s 10.59s
TFS - node (v8.9.0, x86)
Memory used 177,769k (± 0.01%) 179,703k (± 0.01%) +1,933k (+ 1.09%) 179,660k 179,744k
Parse Time 1.32s (± 1.17%) 1.32s (± 0.63%) -0.01s (- 0.45%) 1.30s 1.34s
Bind Time 0.64s (± 1.21%) 0.64s (± 1.21%) -0.00s (- 0.31%) 0.63s 0.66s
Check Time 4.25s (± 0.86%) 4.42s (± 0.59%) +0.16s (+ 3.81%) 4.36s 4.49s
Emit Time 2.86s (± 1.04%) 2.85s (± 1.39%) -0.00s (- 0.10%) 2.79s 2.99s
Total Time 9.07s (± 0.59%) 9.23s (± 0.69%) +0.16s (+ 1.72%) 9.13s 9.43s
Angular - node (v9.0.0, x64)
Memory used 348,134k (± 0.02%) 350,355k (± 0.01%) +2,221k (+ 0.64%) 350,257k 350,435k
Parse Time 1.82s (± 0.48%) 1.83s (± 0.51%) +0.01s (+ 0.44%) 1.81s 1.85s
Bind Time 0.78s (± 0.74%) 0.79s (± 1.11%) +0.01s (+ 1.28%) 0.77s 0.81s
Check Time 4.89s (± 0.74%) 5.02s (± 0.50%) +0.14s (+ 2.80%) 4.98s 5.10s
Emit Time 5.78s (± 0.88%) 5.82s (± 0.97%) +0.04s (+ 0.74%) 5.72s 5.96s
Total Time 13.26s (± 0.54%) 13.47s (± 0.55%) +0.20s (+ 1.54%) 13.33s 13.64s
Monaco - node (v9.0.0, x64)
Memory used 362,066k (± 0.02%) 364,335k (± 0.01%) +2,269k (+ 0.63%) 364,231k 364,431k
Parse Time 1.32s (± 0.47%) 1.32s (± 0.52%) -0.00s (- 0.30%) 1.30s 1.33s
Bind Time 0.83s (± 1.27%) 0.84s (± 1.74%) +0.01s (+ 0.84%) 0.82s 0.89s
Check Time 5.14s (± 1.53%) 5.28s (± 1.43%) +0.14s (+ 2.78%) 5.07s 5.37s
Emit Time 3.04s (± 5.69%) 2.99s (± 4.30%) -0.05s (- 1.58%) 2.89s 3.35s
Total Time 10.33s (± 1.06%) 10.43s (± 0.71%) +0.10s (+ 0.99%) 10.35s 10.65s
TFS - node (v9.0.0, x64)
Memory used 316,001k (± 0.01%) 319,538k (± 0.02%) +3,537k (+ 1.12%) 319,388k 319,652k
Parse Time 1.04s (± 0.50%) 1.05s (± 0.55%) +0.01s (+ 0.58%) 1.04s 1.06s
Bind Time 0.62s (± 0.72%) 0.63s (± 0.53%) +0.01s (+ 1.29%) 0.62s 0.64s
Check Time 4.54s (± 2.00%) 4.57s (± 0.52%) +0.02s (+ 0.53%) 4.50s 4.61s
Emit Time 2.97s (± 2.14%) 3.25s (± 0.95%) +0.28s (+ 9.28%) 3.18s 3.31s
Total Time 9.18s (± 0.55%) 9.49s (± 0.43%) +0.31s (+ 3.39%) 9.40s 9.57s
Angular - node (v9.0.0, x86)
Memory used 197,521k (± 0.03%) 198,658k (± 0.03%) +1,137k (+ 0.58%) 198,499k 198,747k
Parse Time 1.74s (± 0.64%) 1.74s (± 0.35%) +0.00s (+ 0.17%) 1.73s 1.76s
Bind Time 0.90s (± 0.62%) 0.91s (± 0.71%) +0.01s (+ 1.56%) 0.90s 0.93s
Check Time 4.32s (± 0.50%) 4.46s (± 0.31%) +0.14s (+ 3.17%) 4.44s 4.50s
Emit Time 5.51s (± 0.42%) 5.55s (± 0.58%) +0.04s (+ 0.67%) 5.50s 5.64s
Total Time 12.47s (± 0.36%) 12.66s (± 0.30%) +0.19s (+ 1.52%) 12.60s 12.76s
Monaco - node (v9.0.0, x86)
Memory used 202,532k (± 0.03%) 203,748k (± 0.03%) +1,216k (+ 0.60%) 203,598k 203,883k
Parse Time 1.36s (± 1.09%) 1.35s (± 0.50%) -0.01s (- 0.66%) 1.35s 1.38s
Bind Time 0.65s (± 0.90%) 0.66s (± 1.41%) +0.01s (+ 1.70%) 0.64s 0.68s
Check Time 4.75s (± 0.52%) 4.87s (± 0.32%) +0.12s (+ 2.53%) 4.83s 4.90s
Emit Time 3.12s (± 1.11%) 3.10s (± 0.80%) -0.02s (- 0.70%) 3.06s 3.18s
Total Time 9.88s (± 0.42%) 9.98s (± 0.38%) +0.10s (+ 0.99%) 9.91s 10.09s
TFS - node (v9.0.0, x86)
Memory used 177,826k (± 0.02%) 179,693k (± 0.02%) +1,867k (+ 1.05%) 179,579k 179,778k
Parse Time 1.07s (± 0.64%) 1.07s (± 1.07%) +0.00s (+ 0.19%) 1.05s 1.09s
Bind Time 0.58s (± 0.69%) 0.59s (± 0.99%) +0.01s (+ 1.38%) 0.58s 0.60s
Check Time 4.14s (± 0.81%) 4.30s (± 0.90%) +0.16s (+ 3.86%) 4.24s 4.43s
Emit Time 2.79s (± 0.66%) 2.78s (± 1.14%) -0.01s (- 0.29%) 2.70s 2.84s
Total Time 8.57s (± 0.52%) 8.74s (± 0.62%) +0.16s (+ 1.90%) 8.60s 8.86s
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 32116 10
Baseline master 10

@weswigham
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 10, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 10, 2020

Heya @weswigham, I've started to run the perf test suite on this PR at a4fa025. 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

typescript-bot commented Feb 10, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 10, 2020

Heya @weswigham, I've started to run the parallelized community code test suite on this PR at a4fa025. 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.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..32116

Metric master 32116 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 359,115k (± 0.03%) 358,477k (± 0.03%) -639k (- 0.18%) 358,071k 358,639k
Parse Time 1.63s (± 0.41%) 1.62s (± 0.69%) -0.01s (- 0.73%) 1.59s 1.65s
Bind Time 0.88s (± 1.31%) 0.88s (± 0.59%) -0.00s (- 0.34%) 0.87s 0.89s
Check Time 4.68s (± 0.75%) 4.66s (± 0.61%) -0.01s (- 0.28%) 4.58s 4.74s
Emit Time 5.20s (± 0.55%) 5.20s (± 0.39%) +0.00s (+ 0.00%) 5.15s 5.24s
Total Time 12.39s (± 0.52%) 12.37s (± 0.40%) -0.03s (- 0.22%) 12.22s 12.47s
Monaco - node (v10.16.3, x64)
Memory used 364,624k (± 0.01%) 364,664k (± 0.01%) +40k (+ 0.01%) 364,586k 364,766k
Parse Time 1.26s (± 0.70%) 1.26s (± 0.75%) 0.00s ( 0.00%) 1.24s 1.29s
Bind Time 0.78s (± 0.75%) 0.78s (± 0.61%) +0.00s (+ 0.00%) 0.77s 0.79s
Check Time 4.68s (± 0.42%) 4.66s (± 0.38%) -0.03s (- 0.60%) 4.62s 4.70s
Emit Time 2.89s (± 0.66%) 2.89s (± 0.59%) +0.00s (+ 0.14%) 2.87s 2.95s
Total Time 9.61s (± 0.34%) 9.58s (± 0.23%) -0.03s (- 0.26%) 9.53s 9.64s
TFS - node (v10.16.3, x64)
Memory used 324,117k (± 0.02%) 324,173k (± 0.01%) +56k (+ 0.02%) 324,065k 324,288k
Parse Time 0.96s (± 0.85%) 0.95s (± 0.49%) -0.01s (- 1.04%) 0.94s 0.96s
Bind Time 0.74s (± 1.02%) 0.75s (± 1.41%) +0.00s (+ 0.27%) 0.72s 0.77s
Check Time 4.24s (± 0.60%) 4.23s (± 0.47%) -0.01s (- 0.21%) 4.19s 4.29s
Emit Time 3.04s (± 0.45%) 3.03s (± 0.86%) -0.01s (- 0.20%) 2.96s 3.08s
Total Time 8.98s (± 0.49%) 8.96s (± 0.44%) -0.02s (- 0.23%) 8.85s 9.05s
Angular - node (v12.1.0, x64)
Memory used 334,949k (± 0.02%) 334,196k (± 0.08%) -753k (- 0.22%) 333,201k 334,491k
Parse Time 1.58s (± 0.70%) 1.57s (± 0.71%) -0.01s (- 0.63%) 1.56s 1.61s
Bind Time 0.88s (± 0.93%) 0.87s (± 0.68%) -0.01s (- 1.02%) 0.86s 0.89s
Check Time 4.60s (± 0.60%) 4.60s (± 0.55%) +0.00s (+ 0.02%) 4.54s 4.65s
Emit Time 5.41s (± 0.83%) 5.40s (± 1.37%) -0.01s (- 0.24%) 5.33s 5.67s
Total Time 12.47s (± 0.56%) 12.44s (± 0.72%) -0.03s (- 0.23%) 12.34s 12.78s
Monaco - node (v12.1.0, x64)
Memory used 344,563k (± 0.02%) 344,582k (± 0.02%) +20k (+ 0.01%) 344,477k 344,797k
Parse Time 1.22s (± 0.82%) 1.22s (± 0.49%) -0.00s (- 0.41%) 1.20s 1.22s
Bind Time 0.75s (± 1.02%) 0.75s (± 0.74%) +0.00s (+ 0.27%) 0.73s 0.76s
Check Time 4.55s (± 0.34%) 4.55s (± 0.46%) -0.01s (- 0.18%) 4.51s 4.59s
Emit Time 2.98s (± 1.02%) 2.98s (± 0.65%) -0.00s (- 0.17%) 2.94s 3.04s
Total Time 9.50s (± 0.33%) 9.48s (± 0.42%) -0.01s (- 0.15%) 9.41s 9.61s
TFS - node (v12.1.0, x64)
Memory used 306,437k (± 0.01%) 306,420k (± 0.02%) -17k (- 0.01%) 306,302k 306,591k
Parse Time 0.94s (± 1.13%) 0.94s (± 0.79%) +0.01s (+ 0.75%) 0.93s 0.96s
Bind Time 0.71s (± 1.09%) 0.70s (± 0.70%) -0.01s (- 0.71%) 0.69s 0.71s
Check Time 4.17s (± 0.47%) 4.18s (± 0.52%) +0.01s (+ 0.29%) 4.13s 4.24s
Emit Time 3.07s (± 0.55%) 3.07s (± 0.90%) -0.00s (- 0.10%) 3.02s 3.16s
Total Time 8.89s (± 0.35%) 8.90s (± 0.51%) +0.01s (+ 0.15%) 8.80s 9.01s
Angular - node (v8.9.0, x64)
Memory used 354,034k (± 0.02%) 353,473k (± 0.02%) -561k (- 0.16%) 353,290k 353,611k
Parse Time 2.13s (± 0.38%) 2.13s (± 1.30%) +0.01s (+ 0.33%) 2.11s 2.24s
Bind Time 0.93s (± 0.72%) 0.94s (± 0.69%) +0.01s (+ 1.19%) 0.93s 0.96s
Check Time 5.46s (± 0.64%) 5.46s (± 0.71%) +0.01s (+ 0.15%) 5.41s 5.57s
Emit Time 6.22s (± 0.51%) 6.28s (± 0.80%) +0.05s (+ 0.82%) 6.18s 6.38s
Total Time 14.73s (± 0.43%) 14.81s (± 0.58%) +0.07s (+ 0.51%) 14.69s 15.02s
Monaco - node (v8.9.0, x64)
Memory used 362,946k (± 0.01%) 362,949k (± 0.01%) +3k (+ 0.00%) 362,852k 363,057k
Parse Time 1.57s (± 0.60%) 1.58s (± 0.99%) +0.00s (+ 0.19%) 1.55s 1.62s
Bind Time 0.95s (± 0.49%) 0.95s (± 0.61%) +0.00s (+ 0.32%) 0.94s 0.97s
Check Time 5.42s (± 1.72%) 5.40s (± 1.37%) -0.01s (- 0.20%) 5.30s 5.59s
Emit Time 3.28s (± 4.22%) 3.29s (± 3.92%) +0.01s (+ 0.27%) 2.99s 3.49s
Total Time 11.22s (± 0.55%) 11.23s (± 0.65%) +0.00s (+ 0.04%) 11.06s 11.37s
TFS - node (v8.9.0, x64)
Memory used 323,472k (± 0.01%) 323,502k (± 0.01%) +30k (+ 0.01%) 323,432k 323,583k
Parse Time 1.26s (± 0.41%) 1.26s (± 0.47%) +0.00s (+ 0.40%) 1.25s 1.28s
Bind Time 0.75s (± 0.79%) 0.76s (± 0.77%) +0.00s (+ 0.40%) 0.75s 0.77s
Check Time 4.81s (± 0.55%) 4.82s (± 0.75%) +0.01s (+ 0.27%) 4.74s 4.89s
Emit Time 3.20s (± 0.65%) 3.19s (± 0.53%) -0.01s (- 0.31%) 3.17s 3.23s
Total Time 10.03s (± 0.29%) 10.04s (± 0.55%) +0.01s (+ 0.10%) 9.92s 10.16s
Angular - node (v8.9.0, x86)
Memory used 201,207k (± 0.03%) 200,926k (± 0.03%) -282k (- 0.14%) 200,783k 201,023k
Parse Time 2.07s (± 1.19%) 2.05s (± 0.61%) -0.02s (- 0.87%) 2.03s 2.08s
Bind Time 1.06s (± 0.47%) 1.06s (± 0.47%) -0.00s (- 0.00%) 1.05s 1.07s
Check Time 4.97s (± 0.52%) 4.95s (± 0.56%) -0.02s (- 0.38%) 4.89s 5.00s
Emit Time 6.21s (± 1.86%) 6.19s (± 1.49%) -0.02s (- 0.31%) 5.97s 6.32s
Total Time 14.30s (± 0.81%) 14.24s (± 0.71%) -0.05s (- 0.38%) 13.96s 14.39s
Monaco - node (v8.9.0, x86)
Memory used 203,779k (± 0.02%) 203,779k (± 0.01%) +0k (+ 0.00%) 203,722k 203,835k
Parse Time 1.60s (± 0.46%) 1.60s (± 0.51%) +0.01s (+ 0.31%) 1.59s 1.62s
Bind Time 0.77s (± 0.72%) 0.77s (± 0.67%) -0.00s (- 0.13%) 0.76s 0.78s
Check Time 5.13s (± 0.61%) 5.15s (± 0.98%) +0.02s (+ 0.45%) 5.09s 5.30s
Emit Time 3.20s (± 1.36%) 3.18s (± 1.11%) -0.02s (- 0.75%) 3.09s 3.25s
Total Time 10.69s (± 0.44%) 10.70s (± 0.32%) +0.01s (+ 0.06%) 10.64s 10.79s
TFS - node (v8.9.0, x86)
Memory used 182,624k (± 0.02%) 182,598k (± 0.02%) -27k (- 0.01%) 182,526k 182,663k
Parse Time 1.31s (± 0.98%) 1.31s (± 1.07%) -0.01s (- 0.38%) 1.28s 1.34s
Bind Time 0.71s (± 0.56%) 0.72s (± 1.21%) +0.01s (+ 1.27%) 0.70s 0.73s
Check Time 4.59s (± 0.84%) 4.59s (± 0.42%) +0.00s (+ 0.09%) 4.55s 4.64s
Emit Time 2.98s (± 0.89%) 2.96s (± 1.01%) -0.02s (- 0.64%) 2.87s 3.01s
Total Time 9.59s (± 0.57%) 9.58s (± 0.42%) -0.01s (- 0.14%) 9.49s 9.70s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
Benchmark Name Iterations
Current 32116 10
Baseline master 10

@weswigham
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 25, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 25, 2020

Heya @weswigham, I've started to run the perf test suite on this PR at 97efc37. 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

typescript-bot commented Feb 25, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 25, 2020

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

@weswigham
Copy link
Member Author

RWC is 👍 (no diff with master)
User is 👍 (same vue-next CI only (?) failure as master)
DT is ✅ (no failures)
Perf is ongoing but should be OK (it shouldn't have changed since the last run; I doubt this plays poorly with something recent in master)

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..32116

Metric master 32116 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 334,107k (± 0.02%) 333,469k (± 0.02%) -638k (- 0.19%) 333,346k 333,556k
Parse Time 1.63s (± 0.58%) 1.61s (± 0.89%) -0.02s (- 1.29%) 1.58s 1.64s
Bind Time 0.90s (± 0.83%) 0.89s (± 0.87%) -0.01s (- 0.67%) 0.87s 0.91s
Check Time 4.73s (± 0.51%) 4.70s (± 0.32%) -0.02s (- 0.53%) 4.66s 4.73s
Emit Time 5.29s (± 0.49%) 5.20s (± 0.58%) -0.08s (- 1.61%) 5.15s 5.28s
Total Time 12.54s (± 0.37%) 12.41s (± 0.43%) -0.13s (- 1.01%) 12.30s 12.51s
Monaco - node (v10.16.3, x64)
Memory used 335,195k (± 0.02%) 335,177k (± 0.01%) -18k (- 0.01%) 335,113k 335,281k
Parse Time 1.27s (± 0.60%) 1.25s (± 0.72%) -0.01s (- 1.18%) 1.23s 1.27s
Bind Time 0.78s (± 0.63%) 0.77s (± 0.58%) -0.00s (- 0.52%) 0.76s 0.78s
Check Time 4.69s (± 0.27%) 4.70s (± 0.48%) +0.00s (+ 0.11%) 4.64s 4.73s
Emit Time 2.92s (± 0.69%) 2.91s (± 1.01%) -0.01s (- 0.41%) 2.84s 3.00s
Total Time 9.65s (± 0.33%) 9.63s (± 0.53%) -0.02s (- 0.23%) 9.47s 9.70s
TFS - node (v10.16.3, x64)
Memory used 299,334k (± 0.02%) 299,294k (± 0.02%) -40k (- 0.01%) 299,161k 299,401k
Parse Time 0.95s (± 0.52%) 0.94s (± 0.55%) -0.00s (- 0.53%) 0.93s 0.95s
Bind Time 0.75s (± 0.97%) 0.75s (± 0.78%) -0.00s (- 0.66%) 0.73s 0.76s
Check Time 4.25s (± 0.59%) 4.25s (± 0.61%) +0.00s (+ 0.07%) 4.21s 4.31s
Emit Time 3.03s (± 0.81%) 3.03s (± 0.59%) -0.00s (- 0.16%) 3.00s 3.06s
Total Time 8.98s (± 0.46%) 8.97s (± 0.30%) -0.01s (- 0.16%) 8.92s 9.03s
Angular - node (v12.1.0, x64)
Memory used 309,800k (± 0.02%) 309,206k (± 0.02%) -595k (- 0.19%) 309,106k 309,301k
Parse Time 1.58s (± 0.43%) 1.57s (± 0.45%) -0.02s (- 1.01%) 1.55s 1.58s
Bind Time 0.87s (± 0.87%) 0.87s (± 0.94%) -0.00s (- 0.57%) 0.85s 0.89s
Check Time 4.61s (± 0.54%) 4.61s (± 0.64%) -0.01s (- 0.15%) 4.54s 4.68s
Emit Time 5.45s (± 0.65%) 5.41s (± 0.72%) -0.04s (- 0.75%) 5.36s 5.54s
Total Time 12.52s (± 0.38%) 12.46s (± 0.43%) -0.06s (- 0.52%) 12.36s 12.60s
Monaco - node (v12.1.0, x64)
Memory used 315,128k (± 0.02%) 315,099k (± 0.03%) -29k (- 0.01%) 314,969k 315,298k
Parse Time 1.22s (± 0.46%) 1.21s (± 0.43%) -0.01s (- 0.57%) 1.20s 1.22s
Bind Time 0.75s (± 0.63%) 0.75s (± 2.01%) +0.00s (+ 0.27%) 0.74s 0.81s
Check Time 4.56s (± 0.34%) 4.54s (± 0.70%) -0.02s (- 0.37%) 4.46s 4.60s
Emit Time 2.96s (± 0.64%) 2.95s (± 0.53%) -0.01s (- 0.41%) 2.89s 2.97s
Total Time 9.49s (± 0.32%) 9.46s (± 0.49%) -0.03s (- 0.34%) 9.32s 9.53s
TFS - node (v12.1.0, x64)
Memory used 281,633k (± 0.01%) 281,621k (± 0.02%) -12k (- 0.00%) 281,558k 281,740k
Parse Time 0.93s (± 0.63%) 0.92s (± 0.51%) -0.01s (- 0.76%) 0.91s 0.93s
Bind Time 0.71s (± 1.19%) 0.71s (± 1.13%) -0.00s (- 0.42%) 0.69s 0.73s
Check Time 4.20s (± 0.46%) 4.17s (± 0.47%) -0.03s (- 0.60%) 4.12s 4.21s
Emit Time 3.06s (± 0.73%) 3.06s (± 1.55%) 0.00s ( 0.00%) 2.99s 3.23s
Total Time 8.90s (± 0.31%) 8.86s (± 0.58%) -0.04s (- 0.40%) 8.80s 9.01s
Angular - node (v8.9.0, x64)
Memory used 328,926k (± 0.01%) 328,493k (± 0.02%) -433k (- 0.13%) 328,381k 328,634k
Parse Time 2.12s (± 0.61%) 2.11s (± 0.62%) -0.01s (- 0.33%) 2.09s 2.15s
Bind Time 0.93s (± 1.34%) 0.92s (± 0.94%) -0.01s (- 1.29%) 0.90s 0.94s
Check Time 5.50s (± 0.63%) 5.46s (± 0.68%) -0.04s (- 0.69%) 5.37s 5.54s
Emit Time 6.23s (± 0.80%) 6.24s (± 0.77%) +0.00s (+ 0.08%) 6.15s 6.33s
Total Time 14.78s (± 0.58%) 14.73s (± 0.59%) -0.05s (- 0.35%) 14.51s 14.87s
Monaco - node (v8.9.0, x64)
Memory used 333,413k (± 0.02%) 333,454k (± 0.02%) +40k (+ 0.01%) 333,258k 333,679k
Parse Time 1.54s (± 0.58%) 1.54s (± 0.58%) +0.00s (+ 0.06%) 1.52s 1.56s
Bind Time 0.90s (± 0.62%) 0.90s (± 1.11%) +0.00s (+ 0.56%) 0.88s 0.92s
Check Time 5.38s (± 0.62%) 5.37s (± 0.60%) -0.01s (- 0.19%) 5.31s 5.46s
Emit Time 3.53s (± 0.44%) 3.55s (± 0.75%) +0.01s (+ 0.31%) 3.48s 3.60s
Total Time 11.36s (± 0.44%) 11.37s (± 0.51%) +0.01s (+ 0.05%) 11.24s 11.51s
TFS - node (v8.9.0, x64)
Memory used 298,700k (± 0.01%) 298,703k (± 0.02%) +3k (+ 0.00%) 298,593k 298,893k
Parse Time 1.26s (± 0.66%) 1.25s (± 0.46%) -0.00s (- 0.24%) 1.24s 1.27s
Bind Time 0.75s (± 0.66%) 0.75s (± 0.60%) -0.01s (- 0.93%) 0.74s 0.76s
Check Time 4.84s (± 0.69%) 4.84s (± 1.27%) +0.00s (+ 0.02%) 4.76s 5.07s
Emit Time 3.39s (± 0.59%) 3.34s (± 1.98%) -0.04s (- 1.33%) 3.10s 3.42s
Total Time 10.24s (± 0.37%) 10.18s (± 0.35%) -0.06s (- 0.56%) 10.11s 10.25s
Angular - node (v8.9.0, x86)
Memory used 188,673k (± 0.04%) 188,435k (± 0.03%) -238k (- 0.13%) 188,314k 188,607k
Parse Time 2.05s (± 0.48%) 2.05s (± 0.48%) 0.00s ( 0.00%) 2.03s 2.07s
Bind Time 1.08s (± 0.74%) 1.08s (± 0.75%) +0.00s (+ 0.19%) 1.06s 1.10s
Check Time 4.99s (± 0.62%) 5.00s (± 0.48%) +0.00s (+ 0.06%) 4.96s 5.06s
Emit Time 6.14s (± 1.07%) 6.12s (± 0.74%) -0.02s (- 0.29%) 6.03s 6.25s
Total Time 14.27s (± 0.55%) 14.25s (± 0.47%) -0.01s (- 0.11%) 14.13s 14.45s
Monaco - node (v8.9.0, x86)
Memory used 189,065k (± 0.02%) 189,096k (± 0.02%) +30k (+ 0.02%) 189,029k 189,162k
Parse Time 1.60s (± 0.60%) 1.59s (± 0.67%) -0.01s (- 0.81%) 1.57s 1.61s
Bind Time 0.77s (± 0.94%) 0.77s (± 1.09%) -0.00s (- 0.13%) 0.76s 0.80s
Check Time 5.22s (± 1.83%) 5.34s (± 1.35%) +0.11s (+ 2.14%) 5.18s 5.45s
Emit Time 3.13s (± 3.07%) 2.98s (± 4.03%) -0.14s (- 4.58%) 2.83s 3.25s
Total Time 10.72s (± 0.38%) 10.68s (± 0.60%) -0.05s (- 0.42%) 10.57s 10.84s
TFS - node (v8.9.0, x86)
Memory used 170,262k (± 0.02%) 170,291k (± 0.01%) +28k (+ 0.02%) 170,246k 170,362k
Parse Time 1.29s (± 0.51%) 1.29s (± 0.90%) -0.00s (- 0.23%) 1.27s 1.32s
Bind Time 0.72s (± 0.41%) 0.73s (± 2.71%) +0.01s (+ 1.11%) 0.70s 0.79s
Check Time 4.60s (± 0.73%) 4.63s (± 0.53%) +0.03s (+ 0.70%) 4.59s 4.70s
Emit Time 2.96s (± 0.85%) 3.01s (± 2.33%) +0.04s (+ 1.52%) 2.93s 3.22s
Total Time 9.57s (± 0.47%) 9.66s (± 0.86%) +0.08s (+ 0.87%) 9.50s 9.88s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
Benchmark Name Iterations
Current 32116 10
Baseline master 10

Copy link
Member

@ahejlsberg ahejlsberg left a comment

Choose a reason for hiding this comment

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

Approved pending the requested change.

const t = getNormalizedType(target, /*writing*/ true);
if (t === target) break;
target = t;
} while (true);
Copy link
Member

Choose a reason for hiding this comment

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

Put the loop inside getNormalizedType. It is only called from here.

@weswigham weswigham merged commit 15dd000 into microsoft:master Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Backlog Bug PRs that fix a backlog bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generic wrapper interface no longer assignable
5 participants