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

Tweak co/contra inference logic from #52123 #52180

Merged
merged 3 commits into from
Jan 11, 2023

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Jan 10, 2023

Fixes #52179

In the case of coAndContraVariantInferences4, we end up with Modifier as the covariant type, but that isn't a subtype of both Modifier and Decorator, so it shouldn't be chosen; we instead want Node, the contravariant inference. But, if you flip things and test for Decorator instead, Modifier is still the covariant inference, but now it doesn't match Decorator, so we get the desired result, Node.

This tweaks the logic from #52123 by ensuring that even the current inference's candidates are checked against the inferred covariant type; this effectively removes the problematic choice for the covariant type produced via union ordering.

I'm not an expert; maybe the better win is to change getCovariantInference somehow. I just tried this and was surprised that it fixed all of my examples and broke no other test.

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

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 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/142189/artifacts?artifactName=tgz&fileId=5C918491703160B0BD60CA07F72F23EC792D3F9FCF3796D6F854B45B5D1D5DBB02&fileName=/typescript-5.0.0-insiders.20230110.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.0.0-pr-52180-7".;

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@jakebailey
Copy link
Member Author

jakebailey commented Jan 10, 2023

This PR turns out to only fix some of the examples in the linked issue.

@ahejlsberg
Copy link
Member

Interesting situation... Co-variant inferences have no common supertype, so we pick the first in anticipation of an error being issued as a result. However, we could have succeeded by picking the contra-variant inference. Yup, we could do better here. I like your proposed fix.

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 assuming performance is unaffected and tests are clean.

@jakebailey
Copy link
Member Author

All user/top100/etc tests are clean; waiting on perf tests though since I have to merge a fix to main first to unblock it.

@jakebailey
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 11, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 11, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 11, 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/142306/artifacts?artifactName=tgz&fileId=DE14D7E5D5144BBF8161195011F7CE0E54DD6AD8CCDBF5897C9F72065FC0856902&fileName=/typescript-5.0.0-insiders.20230111.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.0.0-pr-52180-17".;

@jakebailey jakebailey mentioned this pull request Jan 11, 2023
11 tasks
@jakebailey
Copy link
Member Author

Just tested this on #49929 and it works really well; even more cases I didn't notice are fixed, including inference I worked around with this:

function castToNodeArray<T extends Node>(nodes: readonly T[]): NodeArray<T> {
    return cast<NodeArray<T>, readonly T[]>(nodes, isNodeArray);
}

I'll add these newly found examples as test cases here.

@jakebailey
Copy link
Member Author

Nah, nevermind; forgot that it was to do with the fact that I had to change cast's signature until #52123, so the above code was already not needed even before this PR, which is more about the union thing when there's ambiguity.

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..52180
Metric main 52180 Delta Best Worst
Angular - node (v18.10.0, x64)
Memory used 372,660k (± 0.01%) 372,420k (± 0.01%) -240k (- 0.06%) 372,342k 372,484k
Parse Time 3.93s (± 0.82%) 3.95s (± 1.07%) +0.01s (+ 0.34%) 3.91s 4.02s
Bind Time 1.20s (± 0.39%) 1.21s (± 0.52%) +0.00s (+ 0.14%) 1.20s 1.21s
Check Time 8.60s (± 0.43%) 8.64s (± 0.44%) +0.04s (+ 0.45%) 8.58s 8.67s
Emit Time 7.50s (± 0.37%) 7.57s (± 1.29%) +0.06s (+ 0.85%) 7.47s 7.75s
Total Time 21.24s (± 0.18%) 21.36s (± 0.73%) +0.12s (+ 0.56%) 21.21s 21.64s
Compiler-Unions - node (v18.10.0, x64)
Memory used 202,113k (± 1.43%) 201,226k (± 1.55%) -887k (- 0.44%) 198,348k 204,223k
Parse Time 1.66s (± 1.58%) 1.64s (± 1.73%) -0.02s (- 1.47%) 1.60s 1.67s
Bind Time 0.79s (± 0.15%) 0.79s (± 0.40%) +0.00s (+ 0.14%) 0.79s 0.80s
Check Time 9.47s (± 1.14%) 9.49s (± 0.55%) +0.02s (+ 0.20%) 9.42s 9.54s
Emit Time 2.76s (± 0.65%) 2.74s (± 0.74%) -0.02s (- 0.61%) 2.71s 2.76s
Total Time 14.68s (± 0.66%) 14.66s (± 0.54%) -0.03s (- 0.19%) 14.55s 14.75s
Monaco - node (v18.10.0, x64)
Memory used 354,119k (± 0.01%) 354,151k (± 0.01%) +32k (+ 0.01%) 354,098k 354,181k
Parse Time 2.93s (± 0.59%) 2.95s (± 0.72%) +0.02s (+ 0.77%) 2.92s 2.97s
Bind Time 1.04s (± 0.82%) 1.04s (± 1.15%) +0.00s (+ 0.03%) 1.03s 1.06s
Check Time 7.24s (± 0.43%) 7.23s (± 0.70%) -0.01s (- 0.08%) 7.16s 7.29s
Emit Time 4.27s (± 0.98%) 4.30s (± 1.31%) +0.02s (+ 0.58%) 4.24s 4.40s
Total Time 15.48s (± 0.41%) 15.52s (± 0.67%) +0.04s (+ 0.27%) 15.41s 15.70s
TFS - node (v18.10.0, x64)
Memory used 310,022k (± 0.01%) 310,193k (± 0.01%) +171k (+ 0.06%) 310,178k 310,228k
Parse Time 2.26s (± 0.50%) 2.27s (± 1.01%) +0.01s (+ 0.53%) 2.23s 2.30s
Bind Time 1.16s (± 0.53%) 1.15s (± 0.75%) -0.01s (- 1.13%) 1.13s 1.16s
Check Time 6.79s (± 0.62%) 6.80s (± 0.71%) +0.01s (+ 0.16%) 6.72s 6.85s
Emit Time 3.93s (± 0.71%) 3.94s (± 0.55%) +0.01s (+ 0.16%) 3.91s 3.96s
Total Time 14.14s (± 0.50%) 14.16s (± 0.58%) +0.02s (+ 0.13%) 14.01s 14.22s
material-ui - node (v18.10.0, x64)
Memory used 485,241k (± 0.02%) 485,287k (± 0.02%) +46k (+ 0.01%) 485,215k 485,396k
Parse Time 3.54s (± 0.68%) 3.53s (± 0.35%) -0.01s (- 0.30%) 3.51s 3.55s
Bind Time 0.97s (± 0.93%) 0.96s (± 1.29%) -0.01s (- 0.58%) 0.95s 0.98s
Check Time 16.91s (± 0.16%) 16.88s (± 0.23%) -0.04s (- 0.21%) 16.82s 16.93s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 21.42s (± 0.19%) 21.37s (± 0.20%) -0.05s (- 0.24%) 21.30s 21.43s
xstate - node (v18.10.0, x64)
Memory used 570,346k (± 0.03%) 570,343k (± 0.01%) -3k (- 0.00%) 570,261k 570,438k
Parse Time 4.42s (± 0.41%) 4.43s (± 0.79%) +0.01s (+ 0.25%) 4.39s 4.48s
Bind Time 1.69s (± 0.80%) 1.71s (± 0.93%) +0.01s (+ 0.75%) 1.68s 1.73s
Check Time 2.61s (± 1.20%) 2.61s (± 1.20%) +0.01s (+ 0.19%) 2.58s 2.65s
Emit Time 0.08s (± 0.18%) 0.08s (± 0.10%) +0.00s (+ 0.07%) 0.08s 0.08s
Total Time 8.81s (± 0.38%) 8.83s (± 0.28%) +0.02s (+ 0.20%) 8.78s 8.85s
Angular - node (v16.17.1, x64)
Memory used 372,012k (± 0.01%) 371,785k (± 0.01%) -227k (- 0.06%) 371,747k 371,828k
Parse Time 4.13s (± 0.35%) 4.13s (± 0.25%) +0.00s (+ 0.09%) 4.12s 4.15s
Bind Time 1.27s (± 0.77%) 1.27s (± 0.42%) +0.00s (+ 0.00%) 1.26s 1.27s
Check Time 9.31s (± 0.27%) 9.32s (± 0.25%) +0.01s (+ 0.08%) 9.29s 9.35s
Emit Time 7.98s (± 0.21%) 8.01s (± 0.30%) +0.03s (+ 0.40%) 7.98s 8.05s
Total Time 22.68s (± 0.17%) 22.72s (± 0.19%) +0.04s (+ 0.18%) 22.67s 22.79s
Compiler-Unions - node (v16.17.1, x64)
Memory used 200,472k (± 0.68%) 199,930k (± 0.04%) -542k (- 0.27%) 199,786k 200,011k
Parse Time 1.80s (± 1.52%) 1.80s (± 0.59%) +0.00s (+ 0.22%) 1.78s 1.81s
Bind Time 0.84s (± 0.80%) 0.84s (± 0.52%) +0.00s (+ 0.43%) 0.84s 0.85s
Check Time 10.09s (± 1.04%) 10.10s (± 0.44%) +0.01s (+ 0.05%) 10.04s 10.14s
Emit Time 3.04s (± 4.21%) 3.06s (± 4.16%) +0.01s (+ 0.42%) 2.97s 3.31s
Total Time 15.77s (± 1.49%) 15.79s (± 0.99%) +0.02s (+ 0.14%) 15.70s 16.11s
Monaco - node (v16.17.1, x64)
Memory used 353,418k (± 0.01%) 353,440k (± 0.01%) +22k (+ 0.01%) 353,402k 353,497k
Parse Time 3.16s (± 0.88%) 3.15s (± 0.53%) -0.01s (- 0.30%) 3.13s 3.17s
Bind Time 1.12s (± 0.85%) 1.12s (± 0.83%) +0.00s (+ 0.26%) 1.11s 1.13s
Check Time 7.86s (± 0.58%) 7.83s (± 0.48%) -0.03s (- 0.33%) 7.78s 7.86s
Emit Time 4.50s (± 0.48%) 4.50s (± 0.61%) +0.00s (+ 0.04%) 4.47s 4.54s
Total Time 16.64s (± 0.41%) 16.61s (± 0.28%) -0.03s (- 0.18%) 16.53s 16.66s
TFS - node (v16.17.1, x64)
Memory used 309,375k (± 0.00%) 309,554k (± 0.01%) +180k (+ 0.06%) 309,537k 309,575k
Parse Time 2.63s (± 1.20%) 2.66s (± 1.50%) +0.03s (+ 1.19%) 2.61s 2.71s
Bind Time 1.06s (± 1.93%) 1.05s (± 2.43%) -0.01s (- 1.23%) 1.02s 1.10s
Check Time 7.42s (± 0.48%) 7.38s (± 0.52%) -0.03s (- 0.47%) 7.34s 7.44s
Emit Time 4.23s (± 0.48%) 4.23s (± 0.40%) -0.00s (- 0.09%) 4.20s 4.25s
Total Time 15.35s (± 0.33%) 15.32s (± 0.23%) -0.02s (- 0.14%) 15.28s 15.37s
material-ui - node (v16.17.1, x64)
Memory used 484,513k (± 0.01%) 484,503k (± 0.01%) -10k (- 0.00%) 484,449k 484,544k
Parse Time 3.67s (± 0.29%) 3.66s (± 0.11%) -0.01s (- 0.29%) 3.66s 3.67s
Bind Time 1.01s (± 0.72%) 1.01s (± 0.56%) -0.00s (- 0.23%) 1.00s 1.02s
Check Time 17.89s (± 0.60%) 17.86s (± 0.35%) -0.04s (- 0.20%) 17.75s 17.92s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 22.58s (± 0.47%) 22.53s (± 0.29%) -0.05s (- 0.23%) 22.42s 22.59s
xstate - node (v16.17.1, x64)
Memory used 567,869k (± 0.02%) 567,986k (± 0.02%) +117k (+ 0.02%) 567,871k 568,200k
Parse Time 4.74s (± 0.58%) 4.75s (± 0.33%) +0.00s (+ 0.08%) 4.73s 4.77s
Bind Time 1.65s (± 0.43%) 1.65s (± 0.44%) -0.00s (- 0.27%) 1.64s 1.66s
Check Time 2.84s (± 0.41%) 2.83s (± 0.17%) -0.01s (- 0.28%) 2.83s 2.84s
Emit Time 0.09s (± 4.58%) 0.08s (± 6.51%) 🟩-0.00s (- 3.93%) 0.08s 0.09s
Total Time 9.33s (± 0.44%) 9.32s (± 0.24%) -0.01s (- 0.11%) 9.30s 9.35s
Angular - node (v14.15.1, x64)
Memory used 365,695k (± 0.01%) 365,439k (± 0.00%) -256k (- 0.07%) 365,423k 365,457k
Parse Time 4.16s (± 0.58%) 4.15s (± 0.56%) -0.01s (- 0.25%) 4.12s 4.19s
Bind Time 1.30s (± 0.78%) 1.30s (± 1.15%) -0.00s (- 0.19%) 1.29s 1.33s
Check Time 9.67s (± 0.91%) 9.67s (± 0.55%) +0.00s (+ 0.01%) 9.61s 9.74s
Emit Time 8.20s (± 0.69%) 8.22s (± 0.85%) +0.02s (+ 0.29%) 8.13s 8.32s
Total Time 23.33s (± 0.62%) 23.34s (± 0.19%) +0.01s (+ 0.05%) 23.28s 23.41s
Compiler-Unions - node (v14.15.1, x64)
Memory used 195,185k (± 0.02%) 195,200k (± 0.02%) +15k (+ 0.01%) 195,161k 195,242k
Parse Time 1.85s (± 0.45%) 1.86s (± 1.04%) +0.01s (+ 0.45%) 1.83s 1.88s
Bind Time 0.87s (± 0.94%) 0.87s (± 0.60%) -0.00s (- 0.19%) 0.87s 0.88s
Check Time 10.12s (± 0.32%) 10.16s (± 0.32%) +0.04s (+ 0.43%) 10.12s 10.21s
Emit Time 3.14s (± 0.68%) 3.13s (± 0.82%) -0.01s (- 0.42%) 3.09s 3.16s
Total Time 15.98s (± 0.23%) 16.01s (± 0.19%) +0.04s (+ 0.23%) 15.98s 16.06s
Monaco - node (v14.15.1, x64)
Memory used 348,263k (± 0.00%) 348,294k (± 0.00%) +31k (+ 0.01%) 348,285k 348,317k
Parse Time 3.24s (± 1.07%) 3.28s (± 1.36%) +0.03s (+ 0.94%) 3.23s 3.34s
Bind Time 1.12s (± 0.91%) 1.11s (± 0.45%) -0.01s (- 0.77%) 1.11s 1.12s
Check Time 8.15s (± 0.69%) 8.18s (± 0.53%) +0.03s (+ 0.33%) 8.13s 8.24s
Emit Time 4.70s (± 0.77%) 4.71s (± 0.73%) +0.01s (+ 0.18%) 4.67s 4.76s
Total Time 17.22s (± 0.58%) 17.28s (± 0.50%) +0.06s (+ 0.34%) 17.20s 17.45s
TFS - node (v14.15.1, x64)
Memory used 304,280k (± 0.00%) 304,471k (± 0.00%) +191k (+ 0.06%) 304,460k 304,482k
Parse Time 2.73s (± 1.20%) 2.79s (± 0.88%) +0.05s (+ 1.97%) 2.76s 2.82s
Bind Time 1.09s (± 0.77%) 1.10s (± 0.46%) +0.01s (+ 1.19%) 1.09s 1.11s
Check Time 7.73s (± 0.42%) 7.72s (± 0.69%) -0.02s (- 0.23%) 7.65s 7.78s
Emit Time 4.60s (± 0.99%) 4.59s (± 0.65%) -0.01s (- 0.25%) 4.56s 4.64s
Total Time 16.15s (± 0.58%) 16.19s (± 0.30%) +0.04s (+ 0.25%) 16.11s 16.25s
material-ui - node (v14.15.1, x64)
Memory used 479,985k (± 0.01%) 479,967k (± 0.01%) -18k (- 0.00%) 479,911k 480,002k
Parse Time 3.89s (± 0.45%) 3.91s (± 0.99%) +0.02s (+ 0.46%) 3.86s 3.96s
Bind Time 1.05s (± 0.56%) 1.05s (± 0.99%) +0.00s (+ 0.17%) 1.04s 1.07s
Check Time 18.88s (± 0.80%) 18.87s (± 0.57%) -0.01s (- 0.03%) 18.76s 19.03s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 23.82s (± 0.71%) 23.83s (± 0.61%) +0.01s (+ 0.03%) 23.67s 24.05s
xstate - node (v14.15.1, x64)
Memory used 556,233k (± 0.01%) 556,319k (± 0.00%) +86k (+ 0.02%) 556,283k 556,343k
Parse Time 5.16s (± 1.09%) 5.14s (± 0.79%) -0.02s (- 0.35%) 5.07s 5.19s
Bind Time 1.58s (± 0.74%) 1.59s (± 0.86%) +0.01s (+ 0.77%) 1.58s 1.62s
Check Time 3.00s (± 0.50%) 2.99s (± 0.73%) -0.01s (- 0.46%) 2.96s 3.02s
Emit Time 0.10s (± 0.08%) 0.10s (± 0.16%) +0.00s (+ 0.03%) 0.10s 0.10s
Total Time 9.84s (± 0.56%) 9.83s (± 0.52%) -0.01s (- 0.14%) 9.74s 9.90s
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 52180 6
Baseline main 6

TSServer

Comparison Report - main..52180
Metric main 52180 Delta Best Worst
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,587ms (± 1.64%) 2,546ms (± 2.53%) -41ms (- 1.60%) 2,467ms 2,631ms
Req 2 - geterr 5,383ms (± 1.19%) 5,356ms (± 1.08%) -26ms (- 0.49%) 5,284ms 5,427ms
Req 3 - references 372ms (± 1.09%) 370ms (± 2.49%) -2ms (- 0.48%) 359ms 379ms
Req 4 - navto 317ms (±27.30%) 283ms (± 1.91%) 🟩-35ms (-10.98%) 277ms 291ms
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) 0 ( 0.00%) 1,356 1,356
Req 5 - completionInfo 265ms (±35.44%) 299ms (± 2.00%) +34ms (+12.92%) 292ms 307ms
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,758ms (± 1.08%) 2,783ms (± 0.88%) +25ms (+ 0.91%) 2,758ms 2,813ms
Req 2 - geterr 3,955ms (± 0.32%) 3,988ms (± 0.61%) +33ms (+ 0.84%) 3,959ms 4,013ms
Req 3 - references 362ms (± 1.51%) 361ms (± 0.92%) -1ms (- 0.36%) 356ms 365ms
Req 4 - navto 290ms (± 0.82%) 294ms (± 1.56%) +4ms (+ 1.27%) 289ms 302ms
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) 0 ( 0.00%) 1,518 1,518
Req 5 - completionInfo 67ms (± 4.08%) 71ms (± 5.52%) +4ms (+ 5.95%) 66ms 76ms
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,387ms (± 0.41%) 3,404ms (± 0.58%) +18ms (+ 0.52%) 3,373ms 3,425ms
Req 2 - geterr 1,549ms (± 1.16%) 1,549ms (± 1.73%) -0ms (- 0.01%) 1,514ms 1,580ms
Req 3 - references 101ms (± 4.11%) 104ms (± 3.72%) +4ms (+ 3.60%) 100ms 108ms
Req 4 - navto 355ms (± 0.92%) 362ms (± 1.57%) +6ms (+ 1.73%) 353ms 367ms
Req 5 - completionInfo count 3,154 (± 0.00%) 3,154 (± 0.00%) 0 ( 0.00%) 3,154 3,154
Req 5 - completionInfo 428ms (± 1.18%) 431ms (± 0.63%) +3ms (+ 0.75%) 429ms 435ms
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,786ms (± 0.52%) 2,793ms (± 0.45%) +7ms (+ 0.25%) 2,775ms 2,807ms
Req 2 - geterr 5,862ms (± 2.34%) 5,842ms (± 2.52%) -21ms (- 0.35%) 5,700ms 5,999ms
Req 3 - references 363ms (± 0.66%) 363ms (± 0.70%) -0ms (- 0.01%) 359ms 365ms
Req 4 - navto 391ms (±29.52%) 352ms (±31.78%) 🟩-40ms (-10.11%) 276ms 498ms
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) 0 ( 0.00%) 1,356 1,356
Req 5 - completionInfo 89ms (± 7.56%) 126ms (±75.23%) 🔻+38ms (+42.33%) 81ms 320ms
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,934ms (± 0.44%) 2,914ms (± 0.39%) -19ms (- 0.66%) 2,893ms 2,925ms
Req 2 - geterr 4,326ms (± 0.48%) 4,283ms (± 0.43%) -44ms (- 1.01%) 4,248ms 4,300ms
Req 3 - references 378ms (± 0.58%) 378ms (± 0.66%) +0ms (+ 0.11%) 375ms 381ms
Req 4 - navto 302ms (± 0.25%) 303ms (± 1.00%) +1ms (+ 0.43%) 297ms 305ms
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) 0 ( 0.00%) 1,518 1,518
Req 5 - completionInfo 317ms (± 0.59%) 275ms (±35.18%) 🟩-42ms (-13.12%) 77ms 319ms
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,757ms (± 0.59%) 3,765ms (± 0.40%) +7ms (+ 0.20%) 3,743ms 3,786ms
Req 2 - geterr 1,448ms (± 0.78%) 1,464ms (± 1.15%) +16ms (+ 1.10%) 1,442ms 1,493ms
Req 3 - references 110ms (± 2.17%) 108ms (± 3.15%) -2ms (- 2.09%) 104ms 113ms
Req 4 - navto 348ms (± 1.58%) 344ms (± 1.16%) -4ms (- 1.25%) 337ms 350ms
Req 5 - completionInfo count 3,154 (± 0.00%) 3,154 (± 0.00%) 0 ( 0.00%) 3,154 3,154
Req 5 - completionInfo 472ms (± 1.84%) 469ms (± 2.25%) -3ms (- 0.65%) 456ms 483ms
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,877ms (± 0.34%) 2,892ms (± 0.62%) +15ms (+ 0.53%) 2,868ms 2,911ms
Req 2 - geterr 6,112ms (± 0.42%) 6,171ms (± 0.52%) +58ms (+ 0.96%) 6,137ms 6,219ms
Req 3 - references 379ms (± 0.56%) 380ms (± 0.55%) +1ms (+ 0.32%) 379ms 385ms
Req 4 - navto 289ms (± 0.65%) 294ms (± 0.76%) +4ms (+ 1.39%) 289ms 296ms
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) 0 ( 0.00%) 1,356 1,356
Req 5 - completionInfo 93ms (± 5.92%) 172ms (±70.70%) 🔻+79ms (+84.60%) 87ms 334ms
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,017ms (± 1.07%) 3,022ms (± 0.89%) +5ms (+ 0.17%) 2,999ms 3,072ms
Req 2 - geterr 4,585ms (± 0.57%) 4,570ms (± 0.67%) -15ms (- 0.32%) 4,515ms 4,597ms
Req 3 - references 402ms (± 0.68%) 405ms (± 0.89%) +3ms (+ 0.79%) 400ms 410ms
Req 4 - navto 306ms (± 0.91%) 307ms (± 1.21%) +2ms (+ 0.64%) 304ms 314ms
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) 0 ( 0.00%) 1,518 1,518
Req 5 - completionInfo 82ms (± 8.67%) 84ms (± 8.91%) +2ms (+ 2.72%) 77ms 96ms
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,869ms (± 0.89%) 3,851ms (± 0.59%) -18ms (- 0.47%) 3,815ms 3,870ms
Req 2 - geterr 1,465ms (± 0.94%) 1,457ms (± 0.81%) -8ms (- 0.56%) 1,446ms 1,479ms
Req 3 - references 127ms (± 2.56%) 125ms (± 3.47%) -2ms (- 1.55%) 120ms 130ms
Req 4 - navto 395ms (± 0.72%) 395ms (± 1.10%) -1ms (- 0.14%) 389ms 402ms
Req 5 - completionInfo count 3,154 (± 0.00%) 3,154 (± 0.00%) 0 ( 0.00%) 3,154 3,154
Req 5 - completionInfo 496ms (± 1.82%) 493ms (± 1.09%) -3ms (- 0.53%) 485ms 498ms
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 52180 6
Baseline main 6

Startup

Comparison Report - main..52180
Metric main 52180 Delta Best Worst
tsc-startup - node (v16.17.1, x64)
Execution time 138.97ms (± 0.21%) 139.83ms (± 0.25%) +0.86ms (+ 0.62%) 138.68ms 146.08ms
tsserver-startup - node (v16.17.1, x64)
Execution time 230.50ms (± 0.25%) 231.81ms (± 0.34%) +1.31ms (+ 0.57%) 229.40ms 239.07ms
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 233.18ms (± 0.24%) 234.29ms (± 0.28%) +1.10ms (+ 0.47%) 232.30ms 241.27ms
typescript-startup - node (v16.17.1, x64)
Execution time 215.36ms (± 0.22%) 215.60ms (± 0.26%) +0.24ms (+ 0.11%) 213.35ms 221.94ms
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 52180 6
Baseline main 6

Developer Information:

Download Benchmark

@jakebailey
Copy link
Member Author

Perf looks the same (normal noise). Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
3 participants