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

Collect contravariant-only inference candidates from shorter annotated functions #52609

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Feb 4, 2023

fixes #52580

The third time's a charm

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Feb 4, 2023
@weswigham
Copy link
Member

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 15, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 15, 2023

Heya @weswigham, I've started to run the tarball bundle task on this PR at 9a63b1f. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 15, 2023

Heya @weswigham, I've started to run the extended test suite on this PR at 9a63b1f. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 15, 2023

Heya @weswigham, I've started to run the perf test suite on this PR at 9a63b1f. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 15, 2023

Hey @weswigham, 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/149553/artifacts?artifactName=tgz&fileId=BF97D3A2ED3794BA1156A36EB43AF5F3D6738F0DED63E272F016EDB4676E4E4102&fileName=/typescript-5.1.0-insiders.20230315.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/pr-build@5.1.0-pr-52609-5".;

@typescript-bot
Copy link
Collaborator

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

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..52609
Metric main 52609 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 362,143k (± 0.01%) 362,167k (± 0.01%) ~ 362,138k 362,213k p=0.378 n=6
Parse Time 3.38s (± 0.35%) 3.37s (± 0.45%) ~ 3.36s 3.40s p=0.621 n=6
Bind Time 1.11s (± 0.37%) 1.12s (± 0.80%) ~ 1.11s 1.13s p=0.086 n=6
Check Time 8.66s (± 0.40%) 8.66s (± 0.43%) ~ 8.63s 8.73s p=1.000 n=6
Emit Time 7.44s (± 0.90%) 7.44s (± 0.51%) ~ 7.38s 7.49s p=0.873 n=6
Total Time 20.59s (± 0.33%) 20.60s (± 0.14%) ~ 20.55s 20.64s p=0.572 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 191,799k (± 1.24%) 191,757k (± 1.19%) ~ 190,753k 196,401k p=0.936 n=6
Parse Time 1.50s (± 2.00%) 1.50s (± 1.62%) ~ 1.46s 1.53s p=0.934 n=6
Bind Time 0.77s (± 1.06%) 0.77s (± 0.53%) ~ 0.77s 0.78s p=0.206 n=6
Check Time 9.34s (± 0.42%) 9.35s (± 0.98%) ~ 9.27s 9.53s p=1.000 n=6
Emit Time 2.74s (± 0.68%) 2.73s (± 0.54%) ~ 2.71s 2.75s p=0.869 n=6
Total Time 14.34s (± 0.43%) 14.35s (± 0.60%) ~ 14.29s 14.52s p=0.936 n=6
Monaco - node (v18.10.0, x64)
Memory used 347,465k (± 0.01%) 347,427k (± 0.01%) ~ 347,378k 347,504k p=0.230 n=6
Parse Time 2.59s (± 1.23%) 2.59s (± 1.03%) ~ 2.54s 2.62s p=0.935 n=6
Bind Time 1.01s (± 1.02%) 1.01s (± 0.80%) ~ 1.00s 1.02s p=0.270 n=6
Check Time 7.07s (± 0.43%) 7.04s (± 0.87%) ~ 6.97s 7.14s p=0.226 n=6
Emit Time 4.26s (± 0.86%) 4.22s (± 0.74%) ~ 4.18s 4.27s p=0.171 n=6
Total Time 14.93s (± 0.44%) 14.87s (± 0.51%) ~ 14.75s 14.96s p=0.108 n=6
TFS - node (v18.10.0, x64)
Memory used 300,815k (± 0.00%) 300,814k (± 0.01%) ~ 300,767k 300,854k p=0.689 n=6
Parse Time 2.07s (± 1.62%) 2.06s (± 1.44%) ~ 2.01s 2.09s p=0.630 n=6
Bind Time 1.13s (± 1.41%) 1.13s (± 0.46%) ~ 1.13s 1.14s p=0.533 n=6
Check Time 6.54s (± 0.77%) 6.52s (± 0.55%) ~ 6.46s 6.55s p=0.573 n=6
Emit Time 3.88s (± 0.75%) 3.85s (± 0.58%) ~ 3.82s 3.88s p=0.126 n=6
Total Time 13.62s (± 0.74%) 13.57s (± 0.54%) ~ 13.45s 13.64s p=0.296 n=6
material-ui - node (v18.10.0, x64)
Memory used 478,387k (± 0.01%) 478,420k (± 0.01%) ~ 478,376k 478,476k p=0.128 n=6
Parse Time 3.08s (± 0.70%) 3.05s (± 2.59%) ~ 2.89s 3.11s p=0.462 n=6
Bind Time 0.91s (± 1.08%) 0.92s (± 5.05%) ~ 0.90s 1.02s p=0.929 n=6
Check Time 17.15s (± 1.17%) 17.07s (± 0.31%) ~ 16.98s 17.14s p=0.378 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.14s (± 1.02%) 21.04s (± 0.39%) ~ 20.89s 21.11s p=0.229 n=6
xstate - node (v18.10.0, x64)
Memory used 553,292k (± 0.02%) 553,267k (± 0.02%) ~ 553,088k 553,367k p=0.810 n=6
Parse Time 3.78s (± 0.59%) 3.76s (± 0.49%) ~ 3.74s 3.79s p=0.188 n=6
Bind Time 1.68s (± 1.46%) 1.69s (± 0.48%) ~ 1.68s 1.70s p=0.324 n=6
Check Time 2.81s (± 1.12%) 2.79s (± 0.89%) ~ 2.76s 2.82s p=0.376 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.35s (± 0.51%) 8.33s (± 0.50%) ~ 8.29s 8.40s p=0.466 n=6
Angular - node (v16.17.1, x64)
Memory used 361,492k (± 0.01%) 361,460k (± 0.01%) ~ 361,430k 361,485k p=0.093 n=6
Parse Time 3.52s (± 0.60%) 3.51s (± 0.29%) ~ 3.50s 3.53s p=0.220 n=6
Bind Time 1.18s (± 1.15%) 1.18s (± 0.35%) ~ 1.18s 1.19s p=0.528 n=6
Check Time 9.49s (± 0.72%) 9.46s (± 0.27%) ~ 9.41s 9.48s p=0.332 n=6
Emit Time 7.93s (± 0.44%) 7.90s (± 0.42%) ~ 7.85s 7.94s p=0.228 n=6
Total Time 22.12s (± 0.44%) 22.05s (± 0.11%) ~ 22.03s 22.10s p=0.421 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 192,564k (± 0.03%) 192,555k (± 0.03%) ~ 192,478k 192,640k p=0.810 n=6
Parse Time 1.58s (± 1.12%) 1.57s (± 1.90%) ~ 1.52s 1.59s p=0.742 n=6
Bind Time 0.83s (± 0.66%) 0.82s (± 0.00%) ~ 0.82s 0.82s p=0.071 n=6
Check Time 10.15s (± 0.47%) 10.08s (± 0.53%) -0.07s (- 0.74%) 9.99s 10.13s p=0.045 n=6
Emit Time 2.99s (± 0.25%) 2.97s (± 0.79%) ~ 2.94s 3.01s p=0.119 n=6
Total Time 15.54s (± 0.23%) 15.44s (± 0.31%) -0.10s (- 0.64%) 15.38s 15.49s p=0.006 n=6
Monaco - node (v16.17.1, x64)
Memory used 346,738k (± 0.00%) 346,712k (± 0.00%) -26k (- 0.01%) 346,701k 346,730k p=0.016 n=6
Parse Time 2.72s (± 0.55%) 2.73s (± 0.60%) ~ 2.72s 2.76s p=0.454 n=6
Bind Time 1.09s (± 0.37%) 1.09s (± 0.47%) ~ 1.08s 1.09s p=0.114 n=6
Check Time 7.74s (± 0.27%) 7.74s (± 0.36%) ~ 7.71s 7.79s p=0.570 n=6
Emit Time 4.46s (± 0.22%) 4.46s (± 0.52%) ~ 4.44s 4.49s p=0.935 n=6
Total Time 16.01s (± 0.21%) 16.02s (± 0.16%) ~ 15.99s 16.06s p=0.935 n=6
TFS - node (v16.17.1, x64)
Memory used 300,157k (± 0.01%) 300,162k (± 0.01%) ~ 300,118k 300,207k p=0.630 n=6
Parse Time 2.17s (± 0.63%) 2.18s (± 0.89%) ~ 2.15s 2.20s p=0.369 n=6
Bind Time 1.24s (± 0.72%) 1.24s (± 1.18%) ~ 1.22s 1.26s p=0.804 n=6
Check Time 7.19s (± 0.61%) 7.19s (± 0.26%) ~ 7.16s 7.21s p=0.871 n=6
Emit Time 4.34s (± 0.97%) 4.34s (± 0.40%) ~ 4.31s 4.36s p=0.936 n=6
Total Time 14.94s (± 0.59%) 14.96s (± 0.21%) ~ 14.93s 15.01s p=0.630 n=6
material-ui - node (v16.17.1, x64)
Memory used 477,755k (± 0.00%) 477,708k (± 0.01%) -47k (- 0.01%) 477,640k 477,780k p=0.045 n=6
Parse Time 3.22s (± 0.36%) 3.21s (± 0.36%) ~ 3.20s 3.23s p=0.185 n=6
Bind Time 0.95s (± 0.43%) 0.96s (± 0.78%) ~ 0.95s 0.97s p=0.100 n=6
Check Time 18.06s (± 0.39%) 18.08s (± 0.31%) ~ 18.02s 18.15s p=0.518 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.23s (± 0.34%) 22.25s (± 0.29%) ~ 22.18s 22.33s p=0.572 n=6
xstate - node (v16.17.1, x64)
Memory used 550,683k (± 0.02%) 550,686k (± 0.01%) ~ 550,633k 550,766k p=0.810 n=6
Parse Time 3.95s (± 0.41%) 3.94s (± 0.13%) ~ 3.93s 3.94s p=0.213 n=6
Bind Time 1.80s (± 0.61%) 1.79s (± 0.84%) ~ 1.77s 1.81s p=0.732 n=6
Check Time 3.03s (± 1.06%) 3.04s (± 1.07%) ~ 3.00s 3.09s p=0.453 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 8.87s (± 0.34%) 8.85s (± 0.46%) ~ 8.80s 8.92s p=0.572 n=6
Angular - node (v14.15.1, x64)
Memory used 355,310k (± 0.01%) 355,336k (± 0.01%) ~ 355,291k 355,375k p=0.149 n=6
Parse Time 3.58s (± 0.68%) 3.59s (± 0.49%) ~ 3.58s 3.62s p=0.325 n=6
Bind Time 1.23s (± 0.51%) 1.23s (± 0.73%) ~ 1.22s 1.24s p=1.000 n=6
Check Time 9.71s (± 0.42%) 9.70s (± 0.49%) ~ 9.65s 9.78s p=1.000 n=6
Emit Time 8.38s (± 0.36%) 8.34s (± 0.60%) ~ 8.28s 8.40s p=0.091 n=6
Total Time 22.90s (± 0.24%) 22.86s (± 0.39%) ~ 22.75s 22.98s p=0.378 n=6
Compiler-Unions - node (v14.15.1, x64)
Memory used 187,762k (± 0.02%) 187,771k (± 0.02%) ~ 187,730k 187,828k p=0.688 n=6
Parse Time 1.60s (± 0.61%) 1.60s (± 0.76%) ~ 1.58s 1.61s p=0.865 n=6
Bind Time 0.84s (± 0.61%) 0.84s (± 0.48%) ~ 0.84s 0.85s p=0.595 n=6
Check Time 10.21s (± 0.40%) 10.12s (± 0.55%) -0.09s (- 0.87%) 10.06s 10.20s p=0.024 n=6
Emit Time 3.16s (± 2.36%) 3.13s (± 0.77%) ~ 3.11s 3.17s p=0.568 n=6
Total Time 15.81s (± 0.41%) 15.68s (± 0.47%) -0.13s (- 0.82%) 15.60s 15.78s p=0.031 n=6
Monaco - node (v14.15.1, x64)
Memory used 341,673k (± 0.00%) 341,692k (± 0.01%) ~ 341,659k 341,732k p=0.173 n=6
Parse Time 2.84s (± 0.62%) 2.82s (± 0.53%) ~ 2.81s 2.85s p=0.073 n=6
Bind Time 1.10s (± 0.74%) 1.10s (± 0.37%) ~ 1.09s 1.10s p=0.584 n=6
Check Time 8.09s (± 0.47%) 8.12s (± 0.67%) ~ 8.04s 8.16s p=0.228 n=6
Emit Time 4.70s (± 1.19%) 4.69s (± 1.61%) ~ 4.63s 4.81s p=0.687 n=6
Total Time 16.73s (± 0.46%) 16.73s (± 0.44%) ~ 16.63s 16.83s p=1.000 n=6
TFS - node (v14.15.1, x64)
Memory used 295,234k (± 0.01%) 295,242k (± 0.00%) ~ 295,222k 295,260k p=0.521 n=6
Parse Time 2.40s (± 1.16%) 2.40s (± 1.13%) ~ 2.37s 2.44s p=0.935 n=6
Bind Time 1.06s (± 0.38%) 1.07s (± 0.51%) ~ 1.06s 1.07s p=0.282 n=6
Check Time 7.47s (± 0.39%) 7.50s (± 0.33%) ~ 7.46s 7.53s p=0.053 n=6
Emit Time 4.29s (± 0.62%) 4.28s (± 0.74%) ~ 4.25s 4.34s p=0.627 n=6
Total Time 15.22s (± 0.28%) 15.25s (± 0.38%) ~ 15.17s 15.31s p=0.469 n=6
material-ui - node (v14.15.1, x64)
Memory used 473,236k (± 0.01%) 473,264k (± 0.01%) ~ 473,225k 473,296k p=0.173 n=6
Parse Time 3.34s (± 0.70%) 3.32s (± 0.40%) ~ 3.31s 3.34s p=0.084 n=6
Bind Time 1.00s (± 0.75%) 1.00s (± 0.00%) ~ 1.00s 1.00s p=0.598 n=6
Check Time 19.01s (± 0.61%) 18.97s (± 0.95%) ~ 18.82s 19.31s p=0.520 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 23.35s (± 0.53%) 23.29s (± 0.80%) ~ 23.14s 23.65s p=0.377 n=6
xstate - node (v14.15.1, x64)
Memory used 539,279k (± 0.00%) 539,307k (± 0.00%) ~ 539,279k 539,331k p=0.092 n=6
Parse Time 4.24s (± 0.41%) 4.24s (± 0.36%) ~ 4.21s 4.25s p=0.683 n=6
Bind Time 1.67s (± 0.38%) 1.67s (± 0.63%) ~ 1.65s 1.68s p=0.388 n=6
Check Time 3.19s (± 0.82%) 3.19s (± 0.52%) ~ 3.17s 3.21s p=0.935 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.19s (± 0.39%) 9.18s (± 0.36%) ~ 9.14s 9.23s p=0.627 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 52609 6
Baseline main 6

TSServer

Comparison Report - main..52609
Metric main 52609 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,392ms (± 0.86%) 2,382ms (± 0.47%) ~ 2,370ms 2,393ms p=0.574 n=6
Req 2 - geterr 5,376ms (± 0.51%) 5,396ms (± 0.60%) ~ 5,361ms 5,435ms p=0.261 n=6
Req 3 - references 336ms (± 0.72%) 337ms (± 0.31%) ~ 335ms 338ms p=0.466 n=6
Req 4 - navto 279ms (± 0.42%) 281ms (± 0.58%) ~ 279ms 283ms p=0.085 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 80ms (± 4.14%) 79ms (± 2.71%) ~ 77ms 83ms p=0.366 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,503ms (± 1.10%) 2,518ms (± 0.74%) ~ 2,498ms 2,543ms p=0.689 n=6
Req 2 - geterr 4,007ms (± 0.99%) 4,007ms (± 0.65%) ~ 3,975ms 4,035ms p=1.000 n=6
Req 3 - references 350ms (± 0.87%) 348ms (± 1.14%) ~ 342ms 354ms p=0.225 n=6
Req 4 - navto 294ms (± 0.67%) 291ms (± 0.94%) ~ 287ms 295ms p=0.145 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 78ms (± 8.56%) 79ms (± 6.50%) ~ 70ms 84ms p=0.935 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,020ms (± 0.27%) 3,025ms (± 0.53%) ~ 3,008ms 3,054ms p=0.689 n=6
Req 2 - geterr 1,612ms (± 1.61%) 1,619ms (± 0.65%) ~ 1,602ms 1,635ms p=0.422 n=6
Req 3 - references 107ms (± 1.49%) 108ms (± 1.60%) ~ 106ms 110ms p=0.563 n=6
Req 4 - navto 356ms (± 0.53%) 357ms (± 0.41%) ~ 354ms 358ms p=0.222 n=6
Req 5 - completionInfo count 2,862 (± 0.00%) 2,862 (± 0.00%) ~ 2,862 2,862 p=1.000 n=6
Req 5 - completionInfo 383ms (± 1.24%) 386ms (± 0.90%) ~ 382ms 392ms p=0.228 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,521ms (± 0.47%) 2,508ms (± 1.13%) ~ 2,485ms 2,553ms p=0.297 n=6
Req 2 - geterr 5,756ms (± 0.78%) 5,780ms (± 0.38%) ~ 5,756ms 5,816ms p=0.471 n=6
Req 3 - references 348ms (± 1.16%) 349ms (± 1.01%) ~ 345ms 355ms p=0.518 n=6
Req 4 - navto 279ms (± 0.62%) 279ms (± 1.09%) ~ 273ms 281ms p=0.373 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 74ms (± 1.02%) 75ms (± 3.47%) ~ 73ms 80ms p=0.503 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,681ms (± 0.50%) 2,691ms (± 0.75%) ~ 2,663ms 2,714ms p=0.520 n=6
Req 2 - geterr 4,353ms (± 0.75%) 4,359ms (± 0.70%) ~ 4,314ms 4,404ms p=0.689 n=6
Req 3 - references 359ms (± 0.34%) 360ms (± 1.17%) ~ 356ms 367ms p=0.871 n=6
Req 4 - navto 288ms (± 0.61%) 289ms (± 1.11%) ~ 283ms 292ms p=0.329 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 77ms (± 6.73%) 74ms (± 4.98%) ~ 67ms 77ms p=0.260 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,172ms (± 0.25%) 3,176ms (± 0.42%) ~ 3,163ms 3,198ms p=0.810 n=6
Req 2 - geterr 1,767ms (± 0.91%) 1,757ms (± 1.09%) ~ 1,721ms 1,775ms p=0.630 n=6
Req 3 - references 116ms (± 0.77%) 117ms (± 1.21%) ~ 115ms 119ms p=0.215 n=6
Req 4 - navto 341ms (± 0.22%) 341ms (± 0.43%) ~ 339ms 343ms p=0.934 n=6
Req 5 - completionInfo count 2,862 (± 0.00%) 2,862 (± 0.00%) ~ 2,862 2,862 p=1.000 n=6
Req 5 - completionInfo 397ms (± 0.94%) 404ms (± 4.90%) ~ 391ms 444ms p=1.000 n=6
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,599ms (± 0.45%) 2,604ms (± 0.64%) ~ 2,584ms 2,626ms p=0.521 n=6
Req 2 - geterr 6,168ms (± 0.39%) 6,163ms (± 0.69%) ~ 6,121ms 6,224ms p=0.810 n=6
Req 3 - references 364ms (± 1.08%) 364ms (± 1.10%) ~ 359ms 371ms p=1.000 n=6
Req 4 - navto 285ms (± 1.50%) 285ms (± 3.65%) ~ 275ms 299ms p=0.628 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 91ms (± 7.18%) 98ms (± 5.50%) ~ 90ms 102ms p=0.064 n=6
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,819ms (± 0.54%) 2,822ms (± 0.42%) ~ 2,811ms 2,837ms p=0.936 n=6
Req 2 - geterr 4,510ms (± 2.00%) 4,587ms (± 2.52%) ~ 4,473ms 4,701ms p=0.078 n=6
Req 3 - references 421ms (± 5.75%) 400ms (± 7.91%) ~ 369ms 431ms p=0.077 n=6
Req 4 - navto 288ms (± 0.51%) 290ms (± 1.29%) ~ 285ms 296ms p=0.416 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 93ms (± 6.79%) 90ms (± 9.18%) ~ 81ms 100ms p=0.935 n=6
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,468ms (± 0.75%) 3,451ms (± 0.40%) ~ 3,429ms 3,471ms p=0.298 n=6
Req 2 - geterr 1,865ms (± 0.94%) 1,868ms (± 0.64%) ~ 1,853ms 1,881ms p=0.810 n=6
Req 3 - references 125ms (± 1.55%) 126ms (± 2.03%) ~ 124ms 130ms p=0.935 n=6
Req 4 - navto 371ms (± 0.50%) 370ms (± 0.37%) ~ 368ms 372ms p=0.463 n=6
Req 5 - completionInfo count 2,862 (± 0.00%) 2,862 (± 0.00%) ~ 2,862 2,862 p=1.000 n=6
Req 5 - completionInfo 411ms (± 1.53%) 409ms (± 1.07%) ~ 404ms 417ms p=0.809 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.15.1, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.15.1, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.15.1, x64)
Benchmark Name Iterations
Current 52609 6
Baseline main 6

Startup

Comparison Report - main..52609
Metric main 52609 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 141.64ms (± 0.20%) 140.79ms (± 0.18%) -0.86ms (- 0.60%) 140.22ms 143.77ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 230.98ms (± 0.34%) 225.19ms (± 0.16%) -5.79ms (- 2.51%) 224.29ms 232.26ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 232.44ms (± 0.25%) 227.29ms (± 0.21%) -5.14ms (- 2.21%) 226.36ms 238.03ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 212.13ms (± 0.36%) 208.20ms (± 0.18%) -3.94ms (- 1.86%) 207.32ms 215.56ms p=0.000 n=600
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
Benchmark Name Iterations
Current 52609 6
Baseline main 6

Developer Information:

Download Benchmark

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

Weird that doing inference on a non-context-sensitive function helps here, but I guess it makes sense since it's a contravariant inference anyway. Makes me wonder if we shouldn't just always be inferring from annotated parameters in inferential contexts, though that's a lot more work, generally. Tests all look OK, so I guess I'll merge this~

@weswigham weswigham merged commit a6ba2e7 into microsoft:main Mar 16, 2023
@Andarist Andarist deleted the fix/collect-contravariant-inference-candidates-from-shorter-annotated-functions branch March 16, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Inconsistent behavior when inferring a generic type from a function
4 participants