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

Apply contextual type to empty array literals #47898

Closed
wants to merge 3 commits into from

Conversation

RyanCavanaugh
Copy link
Member

Just an experiment

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Feb 14, 2022
@RyanCavanaugh
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 14, 2022

Heya @RyanCavanaugh, I've started to run the tarball bundle task on this PR at 62c8ae1. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 14, 2022

Heya @RyanCavanaugh, I've started to run the parallelized community code test suite on this PR at 62c8ae1. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 14, 2022

Heya @RyanCavanaugh, I've started to run the extended test suite on this PR at 62c8ae1. You can monitor the build here.

@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.

@RyanCavanaugh
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this
@typescript-bot pack this
@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 15, 2022

Heya @RyanCavanaugh, I've started to run the parallelized community code test suite on this PR at 6c8f308. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 15, 2022

Heya @RyanCavanaugh, I've started to run the tarball bundle task on this PR at 6c8f308. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 15, 2022

Heya @RyanCavanaugh, I've started to run the extended test suite on this PR at 6c8f308. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 15, 2022

Heya @RyanCavanaugh, I've started to run the perf test suite on this PR at 6c8f308. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 15, 2022

Heya @RyanCavanaugh, I've started to run the abridged perf test suite on this PR at 6c8f308. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 15, 2022

Hey @RyanCavanaugh, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/120057/artifacts?artifactName=tgz&fileId=CCD48A85A5D92B1B5A0BA4D63641EB7AF68C7237F98BD01B4F44342737A5230202&fileName=/typescript-4.7.0-insiders.20220215.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/[email protected]".;

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - main..47898

Metric main 47898 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 356,633k (± 0.02%) 356,643k (± 0.02%) +10k (+ 0.00%) 356,417k 356,782k
Parse Time 1.95s (± 0.46%) 1.96s (± 0.46%) +0.01s (+ 0.41%) 1.95s 1.99s
Bind Time 0.86s (± 0.80%) 0.86s (± 0.69%) 0.00s ( 0.00%) 0.84s 0.87s
Check Time 5.71s (± 0.72%) 5.72s (± 0.52%) +0.01s (+ 0.25%) 5.67s 5.80s
Emit Time 5.93s (± 0.72%) 5.93s (± 0.67%) +0.00s (+ 0.07%) 5.87s 6.05s
Total Time 14.44s (± 0.55%) 14.46s (± 0.50%) +0.02s (+ 0.15%) 14.37s 14.71s
Compiler-Unions - node (v10.16.3, x64)
Memory used 204,383k (± 0.03%) 204,349k (± 0.02%) -34k (- 0.02%) 204,237k 204,451k
Parse Time 0.79s (± 1.02%) 0.78s (± 0.87%) -0.00s (- 0.51%) 0.77s 0.80s
Bind Time 0.52s (± 0.94%) 0.53s (± 0.95%) +0.00s (+ 0.19%) 0.51s 0.53s
Check Time 8.05s (± 0.35%) 8.04s (± 0.34%) -0.01s (- 0.07%) 8.01s 8.14s
Emit Time 2.48s (± 0.79%) 2.48s (± 1.04%) -0.00s (- 0.16%) 2.43s 2.56s
Total Time 11.84s (± 0.29%) 11.83s (± 0.35%) -0.01s (- 0.10%) 11.76s 11.93s
Monaco - node (v10.16.3, x64)
Memory used 343,189k (± 0.04%) 343,180k (± 0.02%) -9k (- 0.00%) 343,075k 343,299k
Parse Time 1.48s (± 0.46%) 1.49s (± 0.40%) +0.00s (+ 0.07%) 1.47s 1.50s
Bind Time 0.75s (± 0.53%) 0.76s (± 0.77%) +0.01s (+ 0.80%) 0.74s 0.77s
Check Time 5.62s (± 0.49%) 5.65s (± 0.79%) +0.03s (+ 0.48%) 5.59s 5.79s
Emit Time 3.23s (± 0.78%) 3.23s (± 0.79%) 0.00s ( 0.00%) 3.18s 3.30s
Total Time 11.09s (± 0.28%) 11.12s (± 0.42%) +0.04s (+ 0.33%) 11.05s 11.24s
TFS - node (v10.16.3, x64)
Memory used 304,951k (± 0.02%) 304,986k (± 0.03%) +34k (+ 0.01%) 304,811k 305,311k
Parse Time 1.20s (± 0.56%) 1.19s (± 0.57%) -0.00s (- 0.17%) 1.18s 1.21s
Bind Time 0.72s (± 0.80%) 0.71s (± 0.48%) -0.01s (- 0.97%) 0.71s 0.72s
Check Time 5.16s (± 0.41%) 5.15s (± 0.50%) -0.00s (- 0.08%) 5.09s 5.22s
Emit Time 3.41s (± 1.08%) 3.36s (± 0.78%) -0.05s (- 1.49%) 3.30s 3.43s
Total Time 10.49s (± 0.56%) 10.43s (± 0.43%) -0.06s (- 0.58%) 10.33s 10.52s
material-ui - node (v10.16.3, x64)
Memory used 472,073k (± 0.02%) 472,025k (± 0.01%) -48k (- 0.01%) 471,920k 472,197k
Parse Time 1.78s (± 0.50%) 1.78s (± 0.27%) +0.00s (+ 0.06%) 1.77s 1.79s
Bind Time 0.67s (± 1.31%) 0.66s (± 0.91%) -0.01s (- 2.09%) 0.64s 0.67s
Check Time 14.32s (± 0.46%) 14.36s (± 0.47%) +0.04s (+ 0.27%) 14.24s 14.50s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.77s (± 0.41%) 16.80s (± 0.42%) +0.03s (+ 0.18%) 16.66s 16.93s
xstate - node (v10.16.3, x64)
Memory used 570,728k (± 0.02%) 570,750k (± 0.02%) +23k (+ 0.00%) 570,514k 570,953k
Parse Time 2.55s (± 0.33%) 2.56s (± 0.43%) +0.01s (+ 0.24%) 2.53s 2.58s
Bind Time 1.01s (± 0.82%) 1.02s (± 0.67%) +0.00s (+ 0.20%) 1.00s 1.03s
Check Time 1.52s (± 0.43%) 1.52s (± 0.59%) +0.00s (+ 0.20%) 1.50s 1.54s
Emit Time 0.07s (± 3.14%) 0.07s (± 0.00%) -0.00s (- 1.41%) 0.07s 0.07s
Total Time 5.15s (± 0.17%) 5.16s (± 0.37%) +0.01s (+ 0.21%) 5.12s 5.20s
Angular - node (v12.1.0, x64)
Memory used 334,134k (± 0.10%) 334,337k (± 0.01%) +203k (+ 0.06%) 334,248k 334,413k
Parse Time 1.95s (± 0.73%) 1.94s (± 0.57%) -0.01s (- 0.46%) 1.93s 1.98s
Bind Time 0.84s (± 0.62%) 0.84s (± 0.70%) +0.00s (+ 0.36%) 0.83s 0.86s
Check Time 5.53s (± 0.39%) 5.50s (± 0.41%) -0.02s (- 0.42%) 5.44s 5.55s
Emit Time 6.21s (± 1.02%) 6.21s (± 0.92%) -0.00s (- 0.08%) 6.10s 6.37s
Total Time 14.53s (± 0.46%) 14.50s (± 0.52%) -0.04s (- 0.24%) 14.37s 14.69s
Compiler-Unions - node (v12.1.0, x64)
Memory used 191,719k (± 0.15%) 191,905k (± 0.03%) +186k (+ 0.10%) 191,764k 192,022k
Parse Time 0.78s (± 1.05%) 0.78s (± 0.71%) +0.00s (+ 0.13%) 0.77s 0.79s
Bind Time 0.53s (± 1.25%) 0.53s (± 0.92%) +0.00s (+ 0.19%) 0.52s 0.54s
Check Time 7.53s (± 0.31%) 7.53s (± 0.56%) -0.00s (- 0.01%) 7.47s 7.66s
Emit Time 2.53s (± 0.87%) 2.49s (± 0.79%) -0.03s (- 1.23%) 2.45s 2.53s
Total Time 11.37s (± 0.39%) 11.33s (± 0.49%) -0.03s (- 0.27%) 11.23s 11.48s
Monaco - node (v12.1.0, x64)
Memory used 326,201k (± 0.02%) 326,257k (± 0.02%) +56k (+ 0.02%) 326,106k 326,501k
Parse Time 1.47s (± 0.78%) 1.47s (± 0.94%) +0.00s (+ 0.07%) 1.44s 1.49s
Bind Time 0.74s (± 0.70%) 0.74s (± 0.54%) 0.00s ( 0.00%) 0.73s 0.75s
Check Time 5.51s (± 0.37%) 5.51s (± 0.48%) +0.01s (+ 0.16%) 5.45s 5.58s
Emit Time 3.23s (± 0.90%) 3.23s (± 0.80%) +0.00s (+ 0.09%) 3.17s 3.30s
Total Time 10.95s (± 0.35%) 10.96s (± 0.46%) +0.01s (+ 0.10%) 10.83s 11.08s
TFS - node (v12.1.0, x64)
Memory used 289,637k (± 0.02%) 289,695k (± 0.02%) +57k (+ 0.02%) 289,565k 289,859k
Parse Time 1.21s (± 0.66%) 1.21s (± 0.73%) -0.01s (- 0.41%) 1.19s 1.22s
Bind Time 0.70s (± 0.93%) 0.70s (± 1.00%) +0.00s (+ 0.43%) 0.69s 0.72s
Check Time 5.08s (± 0.32%) 5.11s (± 0.49%) +0.03s (+ 0.61%) 5.06s 5.17s
Emit Time 3.43s (± 0.54%) 3.46s (± 0.81%) +0.03s (+ 0.93%) 3.39s 3.51s
Total Time 10.41s (± 0.30%) 10.48s (± 0.39%) +0.06s (+ 0.61%) 10.39s 10.58s
material-ui - node (v12.1.0, x64)
Memory used 450,793k (± 0.05%) 450,831k (± 0.01%) +38k (+ 0.01%) 450,762k 450,947k
Parse Time 1.78s (± 0.57%) 1.78s (± 0.54%) -0.00s (- 0.11%) 1.76s 1.80s
Bind Time 0.64s (± 1.14%) 0.63s (± 0.78%) -0.00s (- 0.63%) 0.63s 0.65s
Check Time 12.85s (± 0.58%) 12.85s (± 0.57%) -0.00s (- 0.01%) 12.71s 13.01s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.27s (± 0.51%) 15.27s (± 0.43%) -0.01s (- 0.04%) 15.16s 15.42s
xstate - node (v12.1.0, x64)
Memory used 536,689k (± 0.01%) 536,708k (± 0.02%) +18k (+ 0.00%) 536,465k 537,009k
Parse Time 2.49s (± 0.61%) 2.50s (± 0.38%) +0.00s (+ 0.16%) 2.47s 2.51s
Bind Time 1.05s (± 0.47%) 1.05s (± 0.63%) +0.00s (+ 0.38%) 1.03s 1.06s
Check Time 1.46s (± 0.56%) 1.47s (± 0.85%) +0.00s (+ 0.27%) 1.45s 1.51s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.07s (± 0.32%) 5.08s (± 0.39%) +0.01s (+ 0.24%) 5.05s 5.14s
Angular - node (v14.15.1, x64)
Memory used 332,658k (± 0.01%) 332,712k (± 0.01%) +54k (+ 0.02%) 332,673k 332,743k
Parse Time 1.95s (± 0.42%) 1.95s (± 0.30%) +0.00s (+ 0.21%) 1.94s 1.96s
Bind Time 0.89s (± 0.37%) 0.89s (± 0.25%) +0.00s (+ 0.11%) 0.89s 0.90s
Check Time 5.52s (± 0.59%) 5.55s (± 0.56%) +0.03s (+ 0.52%) 5.50s 5.62s
Emit Time 6.20s (± 0.62%) 6.23s (± 0.92%) +0.03s (+ 0.48%) 6.11s 6.35s
Total Time 14.56s (± 0.44%) 14.62s (± 0.44%) +0.06s (+ 0.44%) 14.51s 14.75s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,117k (± 0.63%) 193,144k (± 0.49%) +1,026k (+ 0.53%) 190,537k 193,842k
Parse Time 0.81s (± 0.62%) 0.81s (± 0.45%) +0.00s (+ 0.12%) 0.80s 0.81s
Bind Time 0.56s (± 0.85%) 0.56s (± 0.59%) +0.00s (+ 0.54%) 0.55s 0.57s
Check Time 7.58s (± 0.47%) 7.61s (± 0.52%) +0.02s (+ 0.29%) 7.50s 7.67s
Emit Time 2.48s (± 0.56%) 2.48s (± 0.72%) -0.00s (- 0.16%) 2.45s 2.53s
Total Time 11.43s (± 0.37%) 11.44s (± 0.46%) +0.02s (+ 0.17%) 11.33s 11.57s
Monaco - node (v14.15.1, x64)
Memory used 324,984k (± 0.00%) 324,995k (± 0.01%) +11k (+ 0.00%) 324,945k 325,022k
Parse Time 1.50s (± 0.39%) 1.51s (± 0.60%) +0.01s (+ 0.80%) 1.49s 1.53s
Bind Time 0.77s (± 0.52%) 0.77s (± 0.29%) +0.00s (+ 0.00%) 0.76s 0.77s
Check Time 5.47s (± 0.60%) 5.43s (± 0.51%) -0.04s (- 0.64%) 5.40s 5.54s
Emit Time 3.29s (± 0.64%) 3.27s (± 0.39%) -0.02s (- 0.55%) 3.24s 3.30s
Total Time 11.02s (± 0.39%) 10.98s (± 0.36%) -0.04s (- 0.37%) 10.93s 11.12s
TFS - node (v14.15.1, x64)
Memory used 288,470k (± 0.01%) 288,482k (± 0.00%) +11k (+ 0.00%) 288,458k 288,520k
Parse Time 1.23s (± 0.59%) 1.23s (± 0.71%) -0.00s (- 0.32%) 1.21s 1.25s
Bind Time 0.74s (± 0.83%) 0.74s (± 0.65%) -0.00s (- 0.27%) 0.73s 0.75s
Check Time 5.08s (± 0.41%) 5.09s (± 0.47%) +0.00s (+ 0.08%) 5.05s 5.16s
Emit Time 3.53s (± 0.96%) 3.53s (± 1.58%) -0.00s (- 0.06%) 3.31s 3.58s
Total Time 10.58s (± 0.26%) 10.58s (± 0.48%) -0.00s (- 0.03%) 10.38s 10.64s
material-ui - node (v14.15.1, x64)
Memory used 448,912k (± 0.00%) 448,914k (± 0.01%) +2k (+ 0.00%) 448,859k 449,005k
Parse Time 1.83s (± 0.30%) 1.83s (± 0.59%) +0.00s (+ 0.16%) 1.82s 1.87s
Bind Time 0.68s (± 0.70%) 0.68s (± 0.53%) +0.00s (+ 0.15%) 0.68s 0.69s
Check Time 12.92s (± 0.53%) 13.00s (± 0.62%) +0.08s (+ 0.64%) 12.82s 13.20s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.43s (± 0.44%) 15.52s (± 0.52%) +0.09s (+ 0.57%) 15.32s 15.70s
xstate - node (v14.15.1, x64)
Memory used 534,408k (± 0.01%) 534,366k (± 0.00%) -41k (- 0.01%) 534,318k 534,432k
Parse Time 2.55s (± 0.42%) 2.55s (± 0.29%) -0.00s (- 0.04%) 2.53s 2.56s
Bind Time 1.16s (± 0.57%) 1.16s (± 0.56%) +0.00s (+ 0.17%) 1.15s 1.17s
Check Time 1.51s (± 0.31%) 1.51s (± 0.56%) +0.00s (+ 0.07%) 1.50s 1.54s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.30s (± 0.27%) 5.30s (± 0.22%) -0.00s (- 0.08%) 5.27s 5.32s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory6 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 47898 10
Baseline main 10

Developer Information:

Download Benchmark

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - main..47898

Metric main 47898 Delta Best Worst
Angular - node (v14.15.1, x64)
Memory used 332,658k (± 0.01%) 332,684k (± 0.01%) +26k (+ 0.01%) 332,610k 332,738k
Parse Time 1.95s (± 0.42%) 1.96s (± 0.44%) +0.02s (+ 0.82%) 1.94s 1.98s
Bind Time 0.89s (± 0.37%) 0.89s (± 0.73%) +0.00s (+ 0.22%) 0.88s 0.90s
Check Time 5.52s (± 0.59%) 5.56s (± 0.63%) +0.03s (+ 0.58%) 5.48s 5.63s
Emit Time 6.20s (± 0.62%) 6.23s (± 0.88%) +0.03s (+ 0.44%) 6.16s 6.43s
Total Time 14.56s (± 0.44%) 14.64s (± 0.50%) +0.08s (+ 0.53%) 14.47s 14.83s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,117k (± 0.63%) 192,801k (± 0.57%) +683k (+ 0.36%) 190,536k 193,854k
Parse Time 0.81s (± 0.62%) 0.81s (± 0.74%) +0.00s (+ 0.12%) 0.80s 0.82s
Bind Time 0.56s (± 0.85%) 0.56s (± 0.53%) +0.01s (+ 0.90%) 0.56s 0.57s
Check Time 7.58s (± 0.47%) 7.61s (± 0.60%) +0.03s (+ 0.38%) 7.52s 7.69s
Emit Time 2.48s (± 0.56%) 2.48s (± 0.71%) -0.01s (- 0.24%) 2.44s 2.51s
Total Time 11.43s (± 0.37%) 11.46s (± 0.51%) +0.03s (+ 0.27%) 11.36s 11.57s
Monaco - node (v14.15.1, x64)
Memory used 324,984k (± 0.00%) 324,995k (± 0.01%) +11k (+ 0.00%) 324,957k 325,037k
Parse Time 1.50s (± 0.39%) 1.51s (± 0.59%) +0.01s (+ 0.60%) 1.49s 1.53s
Bind Time 0.77s (± 0.52%) 0.77s (± 0.58%) +0.00s (+ 0.39%) 0.76s 0.78s
Check Time 5.47s (± 0.60%) 5.47s (± 0.40%) +0.01s (+ 0.13%) 5.44s 5.53s
Emit Time 3.29s (± 0.64%) 3.29s (± 0.92%) +0.01s (+ 0.24%) 3.24s 3.37s
Total Time 11.02s (± 0.39%) 11.05s (± 0.45%) +0.03s (+ 0.27%) 10.96s 11.15s
TFS - node (v14.15.1, x64)
Memory used 288,470k (± 0.01%) 288,485k (± 0.01%) +15k (+ 0.01%) 288,454k 288,519k
Parse Time 1.23s (± 0.59%) 1.24s (± 0.72%) +0.00s (+ 0.24%) 1.22s 1.25s
Bind Time 0.74s (± 0.83%) 0.74s (± 0.46%) -0.00s (- 0.27%) 0.73s 0.74s
Check Time 5.08s (± 0.41%) 5.11s (± 0.60%) +0.03s (+ 0.59%) 5.04s 5.18s
Emit Time 3.53s (± 0.96%) 3.53s (± 1.15%) +0.00s (+ 0.11%) 3.39s 3.59s
Total Time 10.58s (± 0.26%) 10.62s (± 0.46%) +0.04s (+ 0.36%) 10.52s 10.73s
material-ui - node (v14.15.1, x64)
Memory used 448,912k (± 0.00%) 448,810k (± 0.05%) -102k (- 0.02%) 447,851k 448,963k
Parse Time 1.83s (± 0.30%) 1.84s (± 0.51%) +0.01s (+ 0.49%) 1.81s 1.86s
Bind Time 0.68s (± 0.70%) 0.68s (± 0.70%) 0.00s ( 0.00%) 0.67s 0.69s
Check Time 12.92s (± 0.53%) 13.06s (± 0.59%) +0.14s (+ 1.05%) 12.89s 13.31s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.43s (± 0.44%) 15.58s (± 0.50%) +0.15s (+ 0.95%) 15.40s 15.82s
xstate - node (v14.15.1, x64)
Memory used 534,408k (± 0.01%) 534,368k (± 0.00%) -40k (- 0.01%) 534,306k 534,425k
Parse Time 2.55s (± 0.42%) 2.56s (± 0.54%) +0.01s (+ 0.39%) 2.53s 2.60s
Bind Time 1.16s (± 0.57%) 1.16s (± 0.75%) +0.00s (+ 0.17%) 1.15s 1.19s
Check Time 1.51s (± 0.31%) 1.51s (± 0.56%) +0.00s (+ 0.07%) 1.50s 1.53s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.30s (± 0.27%) 5.31s (± 0.34%) +0.01s (+ 0.11%) 5.27s 5.34s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory6 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 47898 10
Baseline main 10

Developer Information:

Download Benchmark

@@ -27093,6 +27096,12 @@ namespace ts {
const elementTypes: Type[] = [];
const elementFlags: ElementFlags[] = [];
const contextualType = getApparentTypeOfContextualType(node);
if (elementCount === 0 && contextualType && !checkMode) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this may need to be moved lower, right below the tuple check - otherwise you'll never be able to get an empty tuple inferred via a contextual type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team Experiment A fork with an experimental idea which might not make it into master For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants