Skip to content

Conversation

RyanCavanaugh
Copy link
Member

@RyanCavanaugh RyanCavanaugh commented Apr 24, 2023

Fixes longstanding complaints about simple recursive functions!

When you have a recursive function with a base case and a self-recursive tail call, there's no reason we can't correctly handle it. With this PR:

function fn1(n: number) {
    if (n === 0) {
        return 3; // <- contributes number
    } else {
        return fn1(n - 1); // <- ignored
    }
}

and

// fn2(): never
function fn2() {
    return fn2();
}

I believe the blocker we had to doing this originally was the lack of a never type, but now we have that, it's straightforward to do this and everything just sort of works out.

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

@typescript-bot test this
@typescript-bot test top100
@typescript-bot user test this
@typescript-bot user test tsserver
@typescript-bot test tsserver top100
@typescript-bot run dt
@typescript-bot perf test this
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 24, 2023

Heya @RyanCavanaugh, I've started to run the diff-based user code test suite (tsserver) on this PR at b0f4ad7. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 24, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 24, 2023

Heya @RyanCavanaugh, I've started to run the diff-based top-repos suite (tsserver) on this PR at b0f4ad7. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 24, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 24, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 24, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 24, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 24, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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/153152/artifacts?artifactName=tgz&fileId=EE5C88BAA3F9E077D7C6EDC8C661D997CD43910E4BDD25941947912FA32B8B9A02&fileName=/typescript-5.1.0-insiders.20230424.tgz"
    }
}

and then running npm install.

@typescript-bot
Copy link
Collaborator

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

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Package install failed"

Otherwise...

Something interesting changed - please have a look.

Details

debug

/mnt/ts_downloads/debug/tsconfig.json

  • [NEW] error TS2367: This comparison appears to be unintentional because the types '"undefined"' and '"object"' have no overlap.
    • /mnt/ts_downloads/debug/node_modules/debug/src/browser.js(100,10)

@typescript-bot
Copy link
Collaborator

Heya @RyanCavanaugh, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.

@ssalbdivad
Copy link

This looks great! Should be able to remove quite a few unnecessary explicit return signatures 😊

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@fatcerberus
Copy link

Inferring never for the infinitely recursive case (by simply ignoring the tail call) is a nice bonus 😃

@fatcerberus
Copy link

Ignore tail calls when collecting the return type of a function

Question: What happens here?

function foo() {
    return bar();  // not mutually recursive
}

Nothing in the OP suggests this is only for self-recursive functions, so I want to check.

@RyanCavanaugh RyanCavanaugh changed the title Ignore tail calls when collecting the return type of a function Ignore self tail calls when collecting the return type of a function Apr 24, 2023
@RyanCavanaugh
Copy link
Member Author

RyanCavanaugh commented Apr 24, 2023

Just an imprecise title; this is only about self-recursive tail calls to the same function as the one being checked. So this doesn't enable automatic checking of e.g. mutual recursion either

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..53995
Metric main 53995 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 365,777k (± 0.01%) 365,834k (± 0.01%) +57k (+ 0.02%) 365,808k 365,870k p=0.013 n=6
Parse Time 3.40s (± 0.77%) 3.39s (± 0.74%) ~ 3.36s 3.42s p=0.808 n=6
Bind Time 1.11s (± 0.37%) 1.11s (± 0.47%) ~ 1.10s 1.11s p=0.114 n=6
Check Time 8.73s (± 0.27%) 8.72s (± 0.50%) ~ 8.65s 8.78s p=0.686 n=6
Emit Time 7.45s (± 0.65%) 7.42s (± 0.73%) ~ 7.38s 7.51s p=0.257 n=6
Total Time 20.69s (± 0.30%) 20.64s (± 0.30%) ~ 20.56s 20.72s p=0.297 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 192,869k (± 1.52%) 192,862k (± 1.53%) ~ 190,892k 196,801k p=0.936 n=6
Parse Time 1.48s (± 1.01%) 1.50s (± 0.00%) +0.02s (+ 1.12%) 1.50s 1.50s p=0.009 n=6
Bind Time 0.77s (± 0.53%) 0.77s (± 0.00%) ~ 0.77s 0.77s p=0.405 n=6
Check Time 9.53s (± 0.34%) 9.54s (± 0.34%) ~ 9.50s 9.58s p=0.572 n=6
Emit Time 2.76s (± 0.62%) 2.77s (± 2.11%) ~ 2.68s 2.86s p=0.514 n=6
Total Time 14.54s (± 0.19%) 14.58s (± 0.40%) ~ 14.49s 14.64s p=0.226 n=6
Monaco - node (v18.10.0, x64)
Memory used 346,510k (± 0.01%) 346,531k (± 0.01%) ~ 346,498k 346,559k p=0.336 n=6
Parse Time 2.59s (± 0.67%) 2.58s (± 1.13%) ~ 2.53s 2.61s p=0.466 n=6
Bind Time 1.00s (± 0.41%) 1.00s (± 0.52%) ~ 0.99s 1.00s p=0.114 n=6
Check Time 7.14s (± 0.41%) 7.15s (± 0.21%) ~ 7.13s 7.17s p=0.870 n=6
Emit Time 4.23s (± 1.57%) 4.23s (± 0.55%) ~ 4.19s 4.25s p=0.373 n=6
Total Time 14.97s (± 0.69%) 14.96s (± 0.20%) ~ 14.93s 15.00s p=0.629 n=6
TFS - node (v18.10.0, x64)
Memory used 300,716k (± 0.01%) 300,720k (± 0.01%) ~ 300,681k 300,752k p=0.748 n=6
Parse Time 2.05s (± 1.13%) 2.06s (± 0.59%) ~ 2.04s 2.07s p=0.934 n=6
Bind Time 1.13s (± 1.07%) 1.14s (± 0.66%) ~ 1.13s 1.15s p=0.502 n=6
Check Time 6.61s (± 0.54%) 6.59s (± 0.48%) ~ 6.54s 6.62s p=0.288 n=6
Emit Time 3.88s (± 0.57%) 3.90s (± 0.42%) ~ 3.88s 3.92s p=0.325 n=6
Total Time 13.68s (± 0.37%) 13.68s (± 0.27%) ~ 13.63s 13.72s p=1.000 n=6
material-ui - node (v18.10.0, x64)
Memory used 482,317k (± 0.02%) 482,319k (± 0.01%) ~ 482,269k 482,362k p=0.936 n=6
Parse Time 3.09s (± 0.43%) 3.10s (± 0.53%) ~ 3.09s 3.13s p=0.081 n=6
Bind Time 0.90s (± 0.83%) 0.91s (± 0.45%) ~ 0.90s 0.91s p=0.100 n=6
Check Time 16.82s (± 0.51%) 16.76s (± 0.35%) ~ 16.69s 16.85s p=0.261 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.82s (± 0.43%) 20.78s (± 0.25%) ~ 20.72s 20.86s p=0.470 n=6
xstate - node (v18.10.0, x64)
Memory used 562,925k (± 0.01%) 562,981k (± 0.01%) ~ 562,920k 563,078k p=0.066 n=6
Parse Time 3.81s (± 0.66%) 3.84s (± 0.85%) ~ 3.78s 3.86s p=0.123 n=6
Bind Time 1.64s (± 0.51%) 1.64s (± 0.74%) ~ 1.62s 1.65s p=0.459 n=6
Check Time 2.81s (± 0.42%) 2.81s (± 0.61%) ~ 2.79s 2.83s p=0.730 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.30%) 8.37s (± 0.37%) ~ 8.32s 8.40s p=0.196 n=6
Angular - node (v16.17.1, x64)
Memory used 365,207k (± 0.01%) 365,187k (± 0.01%) ~ 365,170k 365,234k p=0.229 n=6
Parse Time 3.54s (± 0.43%) 3.53s (± 0.75%) ~ 3.50s 3.57s p=0.256 n=6
Bind Time 1.18s (± 0.54%) 1.17s (± 0.00%) -0.01s (- 0.85%) 1.17s 1.17s p=0.008 n=6
Check Time 9.54s (± 0.65%) 9.55s (± 0.52%) ~ 9.50s 9.63s p=0.747 n=6
Emit Time 7.91s (± 0.29%) 7.90s (± 0.27%) ~ 7.87s 7.93s p=0.686 n=6
Total Time 22.17s (± 0.35%) 22.15s (± 0.24%) ~ 22.09s 22.24s p=0.936 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 192,615k (± 0.04%) 192,660k (± 0.03%) ~ 192,581k 192,740k p=0.261 n=6
Parse Time 1.59s (± 0.47%) 1.59s (± 0.93%) ~ 1.56s 1.60s p=1.000 n=6
Bind Time 0.83s (± 1.01%) 0.82s (± 0.63%) ~ 0.82s 0.83s p=0.923 n=6
Check Time 10.22s (± 0.12%) 10.21s (± 0.56%) ~ 10.12s 10.29s p=1.000 n=6
Emit Time 3.01s (± 0.39%) 3.03s (± 0.25%) +0.02s (+ 0.55%) 3.02s 3.04s p=0.032 n=6
Total Time 15.64s (± 0.05%) 15.65s (± 0.39%) ~ 15.56s 15.72s p=1.000 n=6
Monaco - node (v16.17.1, x64)
Memory used 345,780k (± 0.00%) 345,812k (± 0.00%) +33k (+ 0.01%) 345,802k 345,830k p=0.006 n=6
Parse Time 2.71s (± 0.19%) 2.72s (± 0.33%) ~ 2.71s 2.73s p=0.190 n=6
Bind Time 1.08s (± 0.77%) 1.08s (± 0.38%) ~ 1.08s 1.09s p=0.527 n=6
Check Time 7.84s (± 0.10%) 7.84s (± 0.22%) ~ 7.81s 7.86s p=0.867 n=6
Emit Time 4.45s (± 0.28%) 4.46s (± 0.80%) ~ 4.41s 4.50s p=0.628 n=6
Total Time 16.09s (± 0.17%) 16.10s (± 0.36%) ~ 16.02s 16.18s p=0.629 n=6
TFS - node (v16.17.1, x64)
Memory used 300,081k (± 0.00%) 300,068k (± 0.01%) ~ 300,042k 300,088k p=0.173 n=6
Parse Time 2.15s (± 0.46%) 2.16s (± 0.59%) ~ 2.14s 2.17s p=0.214 n=6
Bind Time 1.24s (± 0.41%) 1.24s (± 1.22%) ~ 1.22s 1.26s p=0.282 n=6
Check Time 7.24s (± 0.38%) 7.25s (± 0.48%) ~ 7.19s 7.30s p=0.570 n=6
Emit Time 4.40s (± 1.06%) 4.38s (± 0.67%) ~ 4.34s 4.41s p=0.681 n=6
Total Time 15.03s (± 0.49%) 15.01s (± 0.39%) ~ 14.92s 15.09s p=0.747 n=6
material-ui - node (v16.17.1, x64)
Memory used 481,566k (± 0.01%) 481,543k (± 0.00%) ~ 481,506k 481,566k p=0.199 n=6
Parse Time 3.23s (± 0.13%) 3.24s (± 0.54%) ~ 3.22s 3.26s p=1.000 n=6
Bind Time 0.94s (± 0.80%) 0.94s (± 0.43%) ~ 0.93s 0.94s p=1.000 n=6
Check Time 17.90s (± 0.65%) 17.80s (± 0.75%) ~ 17.67s 18.04s p=0.149 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.07s (± 0.52%) 21.97s (± 0.56%) ~ 21.86s 22.20s p=0.126 n=6
xstate - node (v16.17.1, x64)
Memory used 560,542k (± 0.02%) 560,548k (± 0.01%) ~ 560,503k 560,628k p=0.378 n=6
Parse Time 4.00s (± 0.34%) 3.99s (± 0.25%) ~ 3.98s 4.00s p=0.801 n=6
Bind Time 1.77s (± 0.23%) 1.77s (± 0.00%) ~ 1.77s 1.77s p=0.405 n=6
Check Time 3.04s (± 0.34%) 3.05s (± 0.27%) ~ 3.04s 3.06s p=0.865 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 8.90s (± 0.26%) 8.89s (± 0.17%) ~ 8.87s 8.91s p=0.806 n=6
Angular - node (v14.21.3, x64)
Memory used 359,203k (± 0.00%) 359,205k (± 0.00%) ~ 359,197k 359,216k p=0.873 n=6
Parse Time 3.66s (± 0.64%) 3.66s (± 0.30%) ~ 3.65s 3.68s p=0.808 n=6
Bind Time 1.22s (± 0.67%) 1.22s (± 0.80%) ~ 1.21s 1.23s p=0.394 n=6
Check Time 9.97s (± 0.46%) 9.94s (± 0.47%) ~ 9.89s 10.01s p=0.377 n=6
Emit Time 8.30s (± 0.58%) 8.25s (± 0.90%) ~ 8.16s 8.37s p=0.228 n=6
Total Time 23.14s (± 0.22%) 23.07s (± 0.33%) ~ 23.02s 23.22s p=0.077 n=6
Compiler-Unions - node (v14.21.3, x64)
Memory used 188,064k (± 0.01%) 188,023k (± 0.02%) ~ 187,982k 188,056k p=0.054 n=6
Parse Time 1.60s (± 0.56%) 1.59s (± 0.66%) ~ 1.58s 1.61s p=0.452 n=6
Bind Time 0.85s (± 0.61%) 0.85s (± 0.74%) ~ 0.84s 0.86s p=0.386 n=6
Check Time 10.35s (± 0.38%) 10.35s (± 0.22%) ~ 10.32s 10.38s p=0.936 n=6
Emit Time 3.18s (± 0.99%) 3.14s (± 0.20%) -0.04s (- 1.26%) 3.13s 3.15s p=0.016 n=6
Total Time 15.98s (± 0.23%) 15.93s (± 0.13%) -0.04s (- 0.27%) 15.91s 15.96s p=0.044 n=6
Monaco - node (v14.21.3, x64)
Memory used 340,875k (± 0.01%) 340,881k (± 0.01%) ~ 340,834k 340,928k p=0.575 n=6
Parse Time 2.80s (± 0.35%) 2.79s (± 0.53%) ~ 2.78s 2.81s p=0.315 n=6
Bind Time 1.11s (± 1.23%) 1.11s (± 0.74%) ~ 1.10s 1.12s p=0.282 n=6
Check Time 8.15s (± 0.34%) 8.14s (± 0.39%) ~ 8.11s 8.18s p=0.627 n=6
Emit Time 4.70s (± 0.77%) 4.70s (± 0.52%) ~ 4.66s 4.73s p=1.000 n=6
Total Time 16.76s (± 0.34%) 16.74s (± 0.39%) ~ 16.65s 16.81s p=0.575 n=6
TFS - node (v14.21.3, x64)
Memory used 295,256k (± 0.00%) 295,240k (± 0.01%) -17k (- 0.01%) 295,214k 295,266k p=0.045 n=6
Parse Time 2.40s (± 0.97%) 2.40s (± 0.70%) ~ 2.37s 2.42s p=0.366 n=6
Bind Time 1.07s (± 0.48%) 1.06s (± 0.38%) ~ 1.06s 1.07s p=0.112 n=6
Check Time 7.58s (± 0.45%) 7.54s (± 0.47%) ~ 7.50s 7.58s p=0.148 n=6
Emit Time 4.33s (± 0.95%) 4.31s (± 0.82%) ~ 4.26s 4.34s p=0.373 n=6
Total Time 15.38s (± 0.43%) 15.31s (± 0.39%) ~ 15.23s 15.37s p=0.063 n=6
material-ui - node (v14.21.3, x64)
Memory used 477,146k (± 0.00%) 477,147k (± 0.00%) ~ 477,112k 477,166k p=0.810 n=6
Parse Time 3.33s (± 0.25%) 3.33s (± 0.52%) ~ 3.31s 3.36s p=0.548 n=6
Bind Time 1.00s (± 0.41%) 1.00s (± 0.63%) ~ 0.99s 1.01s p=0.673 n=6
Check Time 18.70s (± 0.42%) 18.74s (± 0.49%) ~ 18.64s 18.89s p=0.471 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 23.02s (± 0.35%) 23.07s (± 0.40%) ~ 22.96s 23.22s p=0.261 n=6
xstate - node (v14.21.3, x64)
Memory used 549,556k (± 0.00%) 549,560k (± 0.01%) ~ 549,534k 549,608k p=0.575 n=6
Parse Time 4.21s (± 1.01%) 4.20s (± 0.49%) ~ 4.17s 4.23s p=0.566 n=6
Bind Time 1.62s (± 4.08%) 1.63s (± 2.71%) ~ 1.57s 1.66s p=0.868 n=6
Check Time 3.20s (± 0.51%) 3.20s (± 0.46%) ~ 3.18s 3.22s p=0.517 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.12s (± 0.46%) 9.12s (± 0.78%) ~ 9.02s 9.18s 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.21.3, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.21.3, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.21.3, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.21.3, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.21.3, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.21.3, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.21.3, x64)
Benchmark Name Iterations
Current 53995 6
Baseline main 6

TSServer

Comparison Report - main..53995
Metric main 53995 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,530ms (± 0.96%) 2,529ms (± 0.23%) ~ 2,522ms 2,536ms p=0.873 n=6
Req 2 - geterr 5,642ms (± 1.43%) 5,649ms (± 0.26%) ~ 5,629ms 5,670ms p=0.378 n=6
Req 3 - references 344ms (± 0.66%) 342ms (± 0.50%) ~ 340ms 344ms p=0.512 n=6
Req 4 - navto 283ms (± 0.48%) 282ms (± 0.27%) ~ 281ms 283ms p=0.273 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 82ms (± 8.47%) 85ms (± 1.05%) ~ 84ms 86ms p=0.673 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,645ms (± 1.07%) 2,631ms (± 1.08%) ~ 2,591ms 2,679ms p=0.229 n=6
Req 2 - geterr 4,225ms (± 2.30%) 4,292ms (± 0.62%) ~ 4,242ms 4,318ms p=0.065 n=6
Req 3 - references 348ms (± 0.57%) 347ms (± 0.43%) ~ 345ms 349ms p=0.216 n=6
Req 4 - navto 290ms (± 0.47%) 289ms (± 0.51%) ~ 287ms 291ms p=0.120 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 65ms (± 5.50%) 62ms (± 0.83%) ~ 62ms 63ms p=0.143 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,074ms (± 0.57%) 3,075ms (± 0.63%) ~ 3,039ms 3,091ms p=1.000 n=6
Req 2 - geterr 1,611ms (± 1.37%) 1,613ms (± 1.36%) ~ 1,596ms 1,642ms p=0.936 n=6
Req 3 - references 108ms (± 1.23%) 109ms (± 1.82%) ~ 107ms 111ms p=0.675 n=6
Req 4 - navto 362ms (± 0.17%) 363ms (± 0.52%) ~ 361ms 366ms p=1.000 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 372ms (± 1.92%) 374ms (± 1.10%) ~ 367ms 379ms p=0.628 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,655ms (± 0.54%) 2,665ms (± 0.78%) ~ 2,635ms 2,691ms p=0.199 n=6
Req 2 - geterr 6,150ms (± 0.42%) 6,155ms (± 0.49%) ~ 6,120ms 6,205ms p=0.936 n=6
Req 3 - references 354ms (± 0.59%) 355ms (± 1.03%) ~ 350ms 359ms p=0.748 n=6
Req 4 - navto 285ms (± 1.74%) 286ms (± 1.16%) ~ 282ms 292ms p=0.223 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 87ms (± 6.96%) 87ms (± 6.73%) ~ 81ms 93ms p=0.623 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,815ms (± 0.79%) 2,816ms (± 0.46%) ~ 2,790ms 2,823ms p=0.810 n=6
Req 2 - geterr 4,650ms (± 0.20%) 4,655ms (± 0.35%) ~ 4,636ms 4,683ms p=0.689 n=6
Req 3 - references 364ms (± 0.60%) 363ms (± 0.45%) ~ 361ms 365ms p=0.415 n=6
Req 4 - navto 285ms (± 0.69%) 286ms (± 0.26%) ~ 285ms 287ms p=0.365 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 68ms (± 2.22%) 67ms (± 0.94%) ~ 66ms 68ms p=0.591 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,208ms (± 0.33%) 3,215ms (± 0.37%) ~ 3,202ms 3,236ms p=0.422 n=6
Req 2 - geterr 1,760ms (± 0.64%) 1,766ms (± 0.71%) ~ 1,750ms 1,785ms p=0.470 n=6
Req 3 - references 124ms (± 0.94%) 124ms (± 1.44%) ~ 121ms 126ms p=0.742 n=6
Req 4 - navto 343ms (± 1.14%) 340ms (± 0.42%) ~ 338ms 342ms p=0.085 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 394ms (± 1.23%) 393ms (± 0.47%) ~ 390ms 395ms p=0.936 n=6
Compiler-UnionsTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 2,771ms (± 0.46%) 2,776ms (± 0.17%) ~ 2,771ms 2,782ms p=0.378 n=6
Req 2 - geterr 6,339ms (± 1.40%) 6,287ms (± 0.79%) ~ 6,203ms 6,353ms p=0.378 n=6
Req 3 - references 367ms (± 0.92%) 368ms (± 0.64%) ~ 365ms 370ms p=0.685 n=6
Req 4 - navto 290ms (± 0.83%) 290ms (± 0.64%) ~ 288ms 292ms p=0.806 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 100ms (± 4.96%) 99ms (± 5.57%) ~ 92ms 105ms p=0.936 n=6
CompilerTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 2,946ms (± 0.80%) 2,964ms (± 0.54%) ~ 2,943ms 2,980ms p=0.128 n=6
Req 2 - geterr 4,561ms (± 2.08%) 4,528ms (± 0.52%) ~ 4,493ms 4,548ms p=0.873 n=6
Req 3 - references 377ms (± 0.98%) 374ms (± 0.63%) ~ 371ms 377ms p=0.199 n=6
Req 4 - navto 297ms (± 0.70%) 298ms (± 0.17%) ~ 298ms 299ms p=0.059 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 (± 1.64%) 76ms (± 1.07%) ~ 75ms 77ms p=0.281 n=6
xstateTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 3,457ms (± 1.32%) 3,458ms (± 0.35%) ~ 3,446ms 3,479ms p=0.872 n=6
Req 2 - geterr 1,870ms (± 0.60%) 1,860ms (± 0.56%) ~ 1,844ms 1,876ms p=0.149 n=6
Req 3 - references 152ms (± 7.66%) 142ms (± 6.10%) ~ 137ms 159ms p=0.141 n=6
Req 4 - navto 397ms (± 1.59%) 394ms (± 0.80%) ~ 390ms 399ms p=0.574 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 433ms (± 1.12%) 432ms (± 2.05%) ~ 417ms 444ms p=0.936 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.21.3, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.21.3, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.21.3, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.21.3, x64)
Benchmark Name Iterations
Current 53995 6
Baseline main 6

Startup

Comparison Report - main..53995
Metric main 53995 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 141.63ms (± 0.20%) 142.15ms (± 0.21%) +0.52ms (+ 0.37%) 141.49ms 147.65ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 220.23ms (± 0.15%) 221.14ms (± 0.13%) +0.92ms (+ 0.42%) 220.27ms 224.57ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 221.88ms (± 0.18%) 222.64ms (± 0.16%) +0.75ms (+ 0.34%) 221.86ms 229.91ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 203.81ms (± 0.15%) 204.46ms (± 0.15%) +0.65ms (+ 0.32%) 203.67ms 208.47ms 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 53995 6
Baseline main 6

Developer Information:

Download Benchmark

@RyanCavanaugh RyanCavanaugh marked this pull request as ready for review April 24, 2023 17:32
@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

@jakebailey
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 24, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 24, 2023

Hey @jakebailey, 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/153179/artifacts?artifactName=tgz&fileId=EE5C88BAA3F9E077D7C6EDC8C661D997CD43910E4BDD25941947912FA32B8B9A02&fileName=/typescript-5.1.0-insiders.20230424.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-53995-22".;

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@nnnnoel
Copy link

nnnnoel commented Apr 25, 2023

@RyanCavanaugh is this PR also can be resolved for generator function?

@sandersn sandersn requested review from gabritto and rbuckton May 2, 2023 22:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants