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

Fixed a regression with reporting unused parameters in potential predicates #58514

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Andarist
Copy link
Contributor

fixes #58493

@typescript-bot typescript-bot added the For Milestone Bug PRs that fix a bug with a specific milestone label May 13, 2024
@jakebailey
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 13, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,154 62,154 ~ ~ ~ p=1.000 n=6
Types 50,248 50,248 ~ ~ ~ p=1.000 n=6
Memory used 194,058k (± 1.03%) 193,425k (± 0.99%) ~ 192,164k 195,959k p=0.173 n=6
Parse Time 1.30s (± 0.69%) 1.30s (± 1.57%) ~ 1.27s 1.32s p=1.000 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.55s (± 0.34%) 9.54s (± 0.38%) ~ 9.48s 9.58s p=0.627 n=6
Emit Time 2.65s (± 0.44%) 2.64s (± 1.01%) ~ 2.59s 2.66s p=0.236 n=6
Total Time 14.22s (± 0.22%) 14.19s (± 0.36%) ~ 14.13s 14.26s p=0.377 n=6
angular-1 - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 944,110 944,110 ~ ~ ~ p=1.000 n=6
Types 407,140 407,140 ~ ~ ~ p=1.000 n=6
Memory used 1,222,106k (± 0.00%) 1,222,086k (± 0.01%) ~ 1,222,021k 1,222,196k p=0.471 n=6
Parse Time 6.77s (± 0.59%) 6.78s (± 0.62%) ~ 6.73s 6.84s p=1.000 n=6
Bind Time 1.87s (± 0.44%) 1.88s (± 0.52%) ~ 1.87s 1.89s p=0.498 n=6
Check Time 31.15s (± 0.27%) 31.26s (± 0.21%) +0.11s (+ 0.34%) 31.14s 31.32s p=0.045 n=6
Emit Time 14.72s (± 0.53%) 14.80s (± 0.10%) ~ 14.78s 14.82s p=0.064 n=6
Total Time 54.51s (± 0.30%) 54.72s (± 0.13%) +0.20s (+ 0.38%) 54.59s 54.80s p=0.013 n=6
mui-docs - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 1,961,349 1,961,349 ~ ~ ~ p=1.000 n=6
Types 696,910 696,910 ~ ~ ~ p=1.000 n=6
Memory used 1,778,083k (± 0.00%) 1,778,093k (± 0.00%) ~ 1,778,052k 1,778,114k p=0.575 n=6
Parse Time 6.77s (± 0.18%) 6.78s (± 0.29%) ~ 6.76s 6.81s p=0.797 n=6
Bind Time 2.30s (± 0.65%) 2.30s (± 0.53%) ~ 2.29s 2.32s p=1.000 n=6
Check Time 56.95s (± 0.37%) 57.10s (± 0.31%) ~ 56.85s 57.34s p=0.261 n=6
Emit Time 0.14s 0.14s ~ ~ ~ p=1.000 n=6
Total Time 66.17s (± 0.32%) 66.32s (± 0.27%) ~ 66.07s 66.56s p=0.261 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,221,120 1,221,121 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 259,503 259,503 ~ ~ ~ p=1.000 n=6
Memory used 2,336,352k (± 0.03%) 2,337,014k (± 0.04%) ~ 2,336,098k 2,338,264k p=0.173 n=6
Parse Time 5.04s (± 1.54%) 5.05s (± 0.38%) ~ 5.03s 5.08s p=0.471 n=6
Bind Time 1.88s (± 0.64%) 1.87s (± 0.99%) ~ 1.85s 1.89s p=0.934 n=6
Check Time 33.78s (± 0.73%) 33.81s (± 0.21%) ~ 33.73s 33.91s p=0.748 n=6
Emit Time 2.68s (± 3.44%) 2.63s (± 1.61%) ~ 2.57s 2.69s p=0.128 n=6
Total Time 43.41s (± 0.41%) 43.38s (± 0.26%) ~ 43.25s 43.56s p=0.936 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,221,120 1,221,121 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 259,503 259,503 ~ ~ ~ p=1.000 n=6
Memory used 2,412,625k (± 0.02%) 2,413,238k (± 0.03%) ~ 2,412,040k 2,414,007k p=0.093 n=6
Parse Time 6.28s (± 1.24%) 6.20s (± 1.64%) ~ 6.01s 6.29s p=0.173 n=6
Bind Time 2.04s (± 0.67%) 2.06s (± 0.81%) +0.02s (+ 1.15%) 2.04s 2.08s p=0.043 n=6
Check Time 40.20s (± 0.29%) 40.31s (± 0.42%) ~ 40.08s 40.49s p=0.336 n=6
Emit Time 3.18s (± 2.27%) 3.11s (± 2.90%) ~ 3.00s 3.26s p=0.173 n=6
Total Time 51.71s (± 0.26%) 51.68s (± 0.45%) ~ 51.31s 51.91s p=0.936 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 256,716 256,717 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 104,580 104,580 ~ ~ ~ p=1.000 n=6
Memory used 425,973k (± 0.02%) 425,883k (± 0.01%) ~ 425,813k 425,966k p=0.093 n=6
Parse Time 4.17s (± 0.58%) 4.16s (± 0.42%) ~ 4.13s 4.18s p=0.168 n=6
Bind Time 1.62s (± 0.50%) 1.63s (± 0.85%) ~ 1.61s 1.65s p=0.270 n=6
Check Time 22.15s (± 0.49%) 22.11s (± 0.15%) ~ 22.06s 22.15s p=1.000 n=6
Emit Time 1.70s (± 1.05%) 1.73s (± 1.08%) ~ 1.71s 1.75s p=0.056 n=6
Total Time 29.64s (± 0.36%) 29.61s (± 0.17%) ~ 29.54s 29.67s p=0.936 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 224,575 224,575 ~ ~ ~ p=1.000 n=6
Types 93,785 93,785 ~ ~ ~ p=1.000 n=6
Memory used 369,887k (± 0.02%) 369,847k (± 0.04%) ~ 369,711k 370,106k p=0.230 n=6
Parse Time 2.85s (± 0.67%) 2.84s (± 0.82%) ~ 2.81s 2.88s p=0.624 n=6
Bind Time 1.58s (± 1.01%) 1.58s (± 0.80%) ~ 1.56s 1.59s p=0.869 n=6
Check Time 15.64s (± 0.44%) 15.64s (± 0.24%) ~ 15.60s 15.70s p=1.000 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.07s (± 0.41%) 20.06s (± 0.24%) ~ 19.99s 20.14s p=1.000 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,822,415 2,822,415 ~ ~ ~ p=1.000 n=6
Types 957,541 957,541 ~ ~ ~ p=1.000 n=6
Memory used 2,994,941k (± 0.00%) 2,995,024k (± 0.00%) ~ 2,994,981k 2,995,122k p=0.128 n=6
Parse Time 13.82s (± 0.19%) 13.82s (± 0.13%) ~ 13.79s 13.84s p=0.508 n=6
Bind Time 4.14s (± 0.33%) 4.14s (± 0.12%) ~ 4.14s 4.15s p=0.928 n=6
Check Time 73.44s (± 0.46%) 73.44s (± 0.43%) ~ 73.06s 74.02s p=0.936 n=6
Emit Time 23.61s (± 0.45%) 23.47s (± 0.48%) ~ 23.26s 23.57s p=0.078 n=6
Total Time 115.02s (± 0.35%) 114.88s (± 0.30%) ~ 114.53s 115.47s p=0.471 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 265,866 265,866 ~ ~ ~ p=1.000 n=6
Types 108,401 108,401 ~ ~ ~ p=1.000 n=6
Memory used 410,516k (± 0.01%) 410,514k (± 0.01%) ~ 410,452k 410,570k p=0.748 n=6
Parse Time 3.84s (± 1.39%) 3.83s (± 0.86%) ~ 3.79s 3.87s p=1.000 n=6
Bind Time 1.66s (± 0.59%) 1.66s (± 1.04%) ~ 1.64s 1.68s p=0.805 n=6
Check Time 16.98s (± 0.32%) 16.96s (± 0.32%) ~ 16.89s 17.02s p=0.810 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.49s (± 0.38%) 22.45s (± 0.36%) ~ 22.34s 22.56s p=0.748 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 524,639 524,639 ~ ~ ~ p=1.000 n=6
Types 178,906 178,906 ~ ~ ~ p=1.000 n=6
Memory used 462,675k (± 0.02%) 462,662k (± 0.01%) ~ 462,595k 462,744k p=0.689 n=6
Parse Time 3.89s (± 0.46%) 3.88s (± 0.36%) ~ 3.86s 3.90s p=0.370 n=6
Bind Time 1.44s (± 1.04%) 1.44s (± 1.57%) ~ 1.42s 1.48s p=0.285 n=6
Check Time 22.53s (± 0.33%) 22.57s (± 0.54%) ~ 22.36s 22.72s p=0.377 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 27.87s (± 0.26%) 27.89s (± 0.38%) ~ 27.74s 28.06s p=0.810 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user tests comparing main and refs/pull/58514/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top 400 repos comparing main and refs/pull/58514/merge:

Everything looks good!

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

@danvk guessed that the source of the problem was a speculative getTypeOfSymbol. But this PR fixes resolution for all parameters. If it applies to all parameters, why wasn't this observed before Dan's change?

  1. Need tests of used/unused binding patterns. These probably exist already, but please double-check.
  2. If this implementation is correct, I think it would be easier to read in isSelfReferenceLocation, as long as that doesn't make performance worse (from adding a second parameter).

Edit: having looked at checkIfExpressionRefinesAnyParameter, Dan's specific guess doesn't make sense to me. My (fuzzier) guess is that we haven't tried to resolve a parameter name from itself before and never observed that it mistakenly caused the parameter to be marked as used. But I'm not sure what in the new code is causing that.

@@ -11360,18 +11360,23 @@ export function createNameResolver({
location = root.parent;
}
break;
case SyntaxKind.Parameter:
case SyntaxKind.Parameter: {
const param = location as ParameterDeclaration;
Copy link
Member

Choose a reason for hiding this comment

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

style question: is there a reason for all the casts in this code? Maybe it's better to drop this alias and use location as ParameterDeclaration) everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No specific reason, I just prefer to have a single cast than multiple ones that are the same for the same variable. I can change this if you prefer the other style.

case SyntaxKind.Parameter: {
const param = location as ParameterDeclaration;
if (lastLocation === param.name) {
lastSelfReferenceLocation = param;
Copy link
Member

Choose a reason for hiding this comment

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

I'd almost prefer a new parameter and entry in isSelfReferenceLocation like

    function isSelfReferenceLocation(node: Node, lastLocation: Node): node is SelfReferenceLocation {
        switch (node.kind) {
            case SyntaxKind.Parameter: return lastLocation === (node as ParameterDeclaration).name
            // ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just pushed out the suggested change

case SyntaxKind.Parameter:
case SyntaxKind.Parameter: {
const param = location as ParameterDeclaration;
if (lastLocation === param.name) {
Copy link
Member

Choose a reason for hiding this comment

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

what does this do when param.name is a BindingPattern? Do we have tests to make sure that they still correctly get marked unused (and used when used)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, there are tests for that already and the changes to checkIfExpressionRefinesAnyParameter that introduced this bug don't affect binding patterns

@Andarist
Copy link
Contributor Author

My (fuzzier) guess is that we haven't tried to resolve a parameter name from itself before and never observed that it mistakenly caused the parameter to be marked as used.

This is correct.

But I'm not sure what in the new code is causing that.

It's checkIfExpressionRefinesParameter through the getFlowTypeOfReference. It leads to narrowTypeByCallExpression and thus to isMatchingReference and getResolvedSymbol that calls resolveName. It's this newly introduced "fake" control flow that changed this. By fake, I mean it's not created by the binder.

@Andarist Andarist requested a review from sandersn June 10, 2024 08:15
src/compiler/utilities.ts Outdated Show resolved Hide resolved
@jakebailey
Copy link
Member

@typescript-bot test it
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 10, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 10, 2024

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/162149/artifacts?artifactName=tgz&fileId=86D11D5A48715012B573506CBDBDE84042DDBF22442164A7053BEC2F662E26FF02&fileName=/typescript-5.6.0-insiders.20240610.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.6.0-pr-58514-9".;

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user tests with tsc comparing main and refs/pull/58514/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 192,964k (± 0.78%) 193,521k (± 0.93%) ~ 192,323k 195,877k p=0.471 n=6
Parse Time 1.95s (± 1.12%) 1.95s (± 0.46%) ~ 1.94s 1.96s p=0.557 n=6
Bind Time 1.07s (± 1.24%) 1.07s (± 0.97%) ~ 1.05s 1.08s p=0.804 n=6
Check Time 14.04s (± 0.38%) 14.02s (± 0.37%) ~ 13.96s 14.08s p=0.377 n=6
Emit Time 4.05s (± 1.21%) 4.02s (± 1.04%) ~ 3.96s 4.07s p=0.226 n=6
Total Time 21.11s (± 0.48%) 21.05s (± 0.27%) ~ 20.96s 21.14s p=0.628 n=6
angular-1 - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 944,109 944,109 ~ ~ ~ p=1.000 n=6
Types 407,049 407,049 ~ ~ ~ p=1.000 n=6
Memory used 1,222,168k (± 0.00%) 1,222,184k (± 0.01%) ~ 1,222,074k 1,222,260k p=0.575 n=6
Parse Time 8.11s (± 0.55%) 8.11s (± 0.37%) ~ 8.08s 8.16s p=0.747 n=6
Bind Time 2.24s (± 0.82%) 2.23s (± 0.59%) ~ 2.21s 2.25s p=0.372 n=6
Check Time 36.65s (± 0.39%) 36.49s (± 0.26%) ~ 36.33s 36.61s p=0.054 n=6
Emit Time 18.11s (± 0.71%) 18.07s (± 0.35%) ~ 17.99s 18.14s p=0.810 n=6
Total Time 65.11s (± 0.25%) 64.90s (± 0.21%) ~ 64.66s 65.06s p=0.093 n=6
mui-docs - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 2,061,575 2,061,575 ~ ~ ~ p=1.000 n=6
Types 905,189 905,189 ~ ~ ~ p=1.000 n=6
Memory used 2,072,041k (± 0.01%) 2,072,012k (± 0.01%) ~ 2,071,830k 2,072,127k p=0.873 n=6
Parse Time 10.00s (± 0.57%) 9.98s (± 0.23%) ~ 9.94s 10.01s p=0.257 n=6
Bind Time 3.38s (± 1.22%) 3.39s (± 0.85%) ~ 3.35s 3.42s p=0.686 n=6
Check Time 100.70s (± 1.29%) 100.75s (± 1.15%) ~ 98.43s 101.62s p=0.936 n=6
Emit Time 0.20s (± 3.73%) 0.20s (± 2.54%) ~ 0.20s 0.21s p=0.784 n=6
Total Time 114.27s (± 1.09%) 114.31s (± 0.99%) ~ 112.08s 115.22s p=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,230,424 1,230,425 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 261,178 261,178 ~ ~ ~ p=1.000 n=6
Memory used 2,351,286k (± 0.05%) 2,351,511k (± 0.03%) ~ 2,350,104k 2,352,279k p=0.936 n=6
Parse Time 4.97s (± 0.74%) 4.99s (± 1.19%) ~ 4.92s 5.10s p=0.575 n=6
Bind Time 1.90s (± 0.27%) 1.89s (± 0.52%) -0.02s (- 0.79%) 1.88s 1.90s p=0.020 n=6
Check Time 34.14s (± 0.43%) 34.06s (± 0.20%) ~ 34.00s 34.19s p=0.297 n=6
Emit Time 2.67s (± 2.32%) 2.63s (± 1.66%) ~ 2.58s 2.68s p=0.470 n=6
Total Time 43.70s (± 0.34%) 43.60s (± 0.25%) ~ 43.50s 43.80s p=0.128 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,230,424 1,230,425 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 261,178 261,178 ~ ~ ~ p=1.000 n=6
Memory used 2,504,148k (± 3.31%) 2,479,398k (± 3.16%) ~ 2,428,391k 2,581,177k p=0.936 n=6
Parse Time 6.24s (± 0.88%) 6.23s (± 0.87%) ~ 6.15s 6.30s p=0.688 n=6
Bind Time 2.02s (± 0.41%) 2.01s (± 0.99%) ~ 1.98s 2.04s p=0.625 n=6
Check Time 40.62s (± 0.25%) 40.64s (± 0.40%) ~ 40.47s 40.92s p=0.936 n=6
Emit Time 3.10s (± 1.97%) 3.09s (± 2.55%) ~ 3.01s 3.22s p=0.518 n=6
Total Time 51.99s (± 0.29%) 51.98s (± 0.44%) ~ 51.70s 52.27s p=1.000 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 259,181 259,182 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 105,173 105,173 ~ ~ ~ p=1.000 n=6
Memory used 428,879k (± 0.02%) 428,883k (± 0.01%) ~ 428,831k 428,950k p=0.471 n=6
Parse Time 4.08s (± 0.48%) 4.07s (± 0.48%) ~ 4.05s 4.10s p=0.806 n=6
Bind Time 1.63s (± 1.38%) 1.65s (± 0.49%) ~ 1.64s 1.66s p=0.142 n=6
Check Time 22.42s (± 0.28%) 22.36s (± 0.24%) ~ 22.30s 22.42s p=0.108 n=6
Emit Time 1.73s (± 1.29%) 1.73s (± 1.84%) ~ 1.70s 1.79s p=1.000 n=6
Total Time 29.87s (± 0.28%) 29.81s (± 0.29%) ~ 29.72s 29.95s p=0.297 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 224,565 224,565 ~ ~ ~ p=1.000 n=6
Types 93,734 93,734 ~ ~ ~ p=1.000 n=6
Memory used 369,725k (± 0.02%) 369,729k (± 0.02%) ~ 369,692k 369,839k p=1.000 n=6
Parse Time 2.80s (± 0.84%) 2.80s (± 0.76%) ~ 2.77s 2.82s p=1.000 n=6
Bind Time 1.59s (± 1.05%) 1.57s (± 0.53%) ~ 1.57s 1.59s p=0.122 n=6
Check Time 15.69s (± 0.19%) 15.65s (± 0.14%) -0.04s (- 0.29%) 15.62s 15.68s p=0.023 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.07s (± 0.22%) 20.02s (± 0.12%) -0.05s (- 0.27%) 19.98s 20.05s p=0.045 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,852,851 2,852,851 ~ ~ ~ p=1.000 n=6
Types 967,821 967,821 ~ ~ ~ p=1.000 n=6
Memory used 3,024,837k (± 0.00%) 3,024,806k (± 0.00%) ~ 3,024,738k 3,024,900k p=0.298 n=6
Parse Time 13.87s (± 0.42%) 13.85s (± 0.17%) ~ 13.82s 13.88s p=0.421 n=6
Bind Time 4.21s (± 1.93%) 4.21s (± 2.20%) ~ 4.13s 4.39s p=0.871 n=6
Check Time 75.70s (± 2.49%) 74.34s (± 1.47%) ~ 73.42s 76.38s p=0.173 n=6
Emit Time 22.01s (± 7.99%) 23.16s (± 4.44%) ~ 21.26s 24.02s p=0.230 n=6
Total Time 115.78s (± 0.21%) 115.57s (± 0.35%) ~ 115.00s 116.19s p=0.298 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 266,613 266,613 ~ ~ ~ p=1.000 n=6
Types 108,648 108,648 ~ ~ ~ p=1.000 n=6
Memory used 411,753k (± 0.02%) 411,812k (± 0.02%) ~ 411,678k 411,926k p=0.378 n=6
Parse Time 4.76s (± 0.91%) 4.76s (± 0.61%) ~ 4.73s 4.80s p=0.871 n=6
Bind Time 2.06s (± 1.18%) 2.06s (± 1.17%) ~ 2.02s 2.09s p=0.462 n=6
Check Time 21.11s (± 0.30%) 21.13s (± 0.53%) ~ 20.97s 21.24s p=0.688 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 27.93s (± 0.37%) 27.95s (± 0.42%) ~ 27.80s 28.08s p=0.630 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 526,436 526,436 ~ ~ ~ p=1.000 n=6
Types 179,425 179,425 ~ ~ ~ p=1.000 n=6
Memory used 464,301k (± 0.02%) 464,180k (± 0.07%) ~ 463,540k 464,434k p=0.810 n=6
Parse Time 2.64s (± 0.62%) 2.63s (± 0.24%) ~ 2.62s 2.64s p=0.615 n=6
Bind Time 0.99s (± 0.76%) 0.99s (± 0.52%) ~ 0.99s 1.00s p=0.241 n=6
Check Time 15.27s (± 0.46%) 15.23s (± 0.34%) ~ 15.17s 15.30s p=0.336 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 18.89s (± 0.38%) 18.85s (± 0.27%) ~ 18.80s 18.92s p=0.423 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top 400 repos with tsc comparing main and refs/pull/58514/merge:

Everything looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in detecting unused parameters in 5.5.0-beta
4 participants