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

Avoid resolving objects in getTypeFacts when caller doesn't need that info #55459

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Aug 22, 2023

This stems from a discord conversation (#54939 (comment)) where getTypeFacts spends all of its time resolving structured type members, when all it cared about was whether or not the type was nullable.

It turns out that the vast majority of calls to getTypeFacts only care about a subset of flags (and mainly, nullable-ness), so this may be a perf win.

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

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 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/156782/artifacts?artifactName=tgz&fileId=C722BD5B80A3F9D10BBF1DA64F3DDBD790FEE76531CD37D292AB6FFD74778D4102&fileName=/typescript-5.3.0-insiders.20230822.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

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

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v16.17.1, x64)
Memory used 300,327k (± 0.01%) 300,244k (± 0.00%) -83k (- 0.03%) 300,232k 300,257k p=0.005 n=6
Parse Time 3.02s (± 0.14%) 3.02s (± 0.18%) ~ 3.02s 3.03s p=0.054 n=6
Bind Time 0.93s (± 0.00%) 0.93s (± 0.00%) ~ 0.93s 0.93s p=1.000 n=6
Check Time 9.49s (± 0.24%) 9.42s (± 0.39%) -0.07s (- 0.70%) 9.35s 9.46s p=0.005 n=6
Emit Time 7.63s (± 0.36%) 7.63s (± 0.47%) ~ 7.58s 7.67s p=0.935 n=6
Total Time 21.07s (± 0.19%) 21.01s (± 0.32%) ~ 20.89s 21.08s p=0.077 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 194,335k (± 0.52%) 193,918k (± 0.04%) ~ 193,804k 193,993k p=1.000 n=6
Parse Time 1.56s (± 0.94%) 1.56s (± 1.17%) ~ 1.55s 1.59s p=0.928 n=6
Bind Time 0.79s (± 0.00%) 0.79s (± 0.00%) ~ 0.79s 0.79s p=1.000 n=6
Check Time 9.97s (± 0.24%) 9.87s (± 0.20%) -0.10s (- 0.99%) 9.84s 9.89s p=0.005 n=6
Emit Time 2.74s (± 0.23%) 2.75s (± 0.15%) +0.01s (+ 0.30%) 2.74s 2.75s p=0.033 n=6
Total Time 15.06s (± 0.30%) 14.97s (± 0.21%) -0.10s (- 0.64%) 14.92s 15.01s p=0.006 n=6
Monaco - node (v16.17.1, x64)
Memory used 347,135k (± 0.01%) 347,099k (± 0.01%) ~ 347,060k 347,141k p=0.066 n=6
Parse Time 2.69s (± 0.15%) 2.69s (± 0.43%) ~ 2.68s 2.71s p=0.787 n=6
Bind Time 0.99s (± 0.00%) 0.99s (± 0.52%) ~ 0.99s 1.00s p=0.174 n=6
Check Time 7.92s (± 0.28%) 7.92s (± 0.21%) ~ 7.90s 7.94s p=0.681 n=6
Emit Time 4.26s (± 0.35%) 4.25s (± 0.28%) ~ 4.24s 4.27s p=0.451 n=6
Total Time 15.86s (± 0.21%) 15.85s (± 0.11%) ~ 15.82s 15.87s p=0.518 n=6
TFS - node (v16.17.1, x64)
Memory used 301,139k (± 0.00%) 301,123k (± 0.00%) -16k (- 0.01%) 301,109k 301,135k p=0.030 n=6
Parse Time 2.18s (± 0.92%) 2.17s (± 0.71%) ~ 2.15s 2.19s p=0.461 n=6
Bind Time 1.11s (± 0.37%) 1.11s (± 0.46%) ~ 1.11s 1.12s p=0.595 n=6
Check Time 7.25s (± 0.42%) 7.17s (± 0.35%) -0.08s (- 1.13%) 7.15s 7.21s p=0.006 n=6
Emit Time 3.98s (± 0.50%) 3.98s (± 0.34%) ~ 3.96s 4.00s p=0.805 n=6
Total Time 14.53s (± 0.33%) 14.44s (± 0.18%) -0.09s (- 0.61%) 14.40s 14.47s p=0.010 n=6
material-ui - node (v16.17.1, x64)
Memory used 479,465k (± 0.00%) 479,395k (± 0.00%) -70k (- 0.01%) 479,390k 479,401k p=0.005 n=6
Parse Time 3.15s (± 0.13%) 3.15s (± 0.16%) ~ 3.15s 3.16s p=0.595 n=6
Bind Time 0.91s (± 0.00%) 0.91s (± 0.00%) ~ 0.91s 0.91s p=1.000 n=6
Check Time 17.89s (± 0.25%) 17.90s (± 0.14%) ~ 17.88s 17.95s p=0.807 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.95s (± 0.18%) 21.97s (± 0.13%) ~ 21.94s 22.02s p=0.519 n=6
xstate - node (v16.17.1, x64)
Memory used 542,863k (± 0.01%) 542,845k (± 0.02%) ~ 542,732k 542,930k p=0.810 n=6
Parse Time 3.70s (± 0.20%) 3.69s (± 0.33%) ~ 3.68s 3.71s p=0.796 n=6
Bind Time 1.40s (± 4.72%) 1.35s (± 3.45%) ~ 1.33s 1.45s p=0.240 n=6
Check Time 3.27s (± 2.75%) 3.30s (± 1.93%) ~ 3.17s 3.34s p=0.686 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 4.99%) ~ 0.08s 0.09s p=0.405 n=6
Total Time 8.45s (± 0.33%) 8.43s (± 0.36%) ~ 8.38s 8.46s p=0.169 n=6
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,494ms (± 0.13%) 2,491ms (± 0.24%) ~ 2,483ms 2,500ms p=0.335 n=6
Req 2 - geterr 5,945ms (± 0.21%) 5,937ms (± 0.23%) ~ 5,922ms 5,960ms p=0.261 n=6
Req 3 - references 344ms (± 0.54%) 342ms (± 0.54%) ~ 341ms 346ms p=0.113 n=6
Req 4 - navto 277ms (± 0.23%) 277ms (± 0.15%) ~ 277ms 278ms p=0.673 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.01%) 85ms (± 8.22%) ~ 76ms 93ms p=0.801 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,623ms (± 0.77%) 2,620ms (± 0.68%) ~ 2,602ms 2,642ms p=0.936 n=6
Req 2 - geterr 4,770ms (± 0.18%) 4,737ms (± 0.22%) -34ms (- 0.71%) 4,728ms 4,751ms p=0.005 n=6
Req 3 - references 350ms (± 0.21%) 350ms (± 0.35%) ~ 349ms 352ms p=0.503 n=6
Req 4 - navto 269ms (± 0.30%) 270ms (± 0.20%) ~ 269ms 270ms p=0.859 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 79ms (± 0.52%) 79ms (± 0.80%) ~ 78ms 80ms p=0.673 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,715ms (± 0.16%) 2,716ms (± 0.29%) ~ 2,706ms 2,728ms p=1.000 n=6
Req 2 - geterr 1,928ms (± 2.12%) 1,937ms (± 2.48%) ~ 1,875ms 1,982ms p=0.471 n=6
Req 3 - references 136ms (± 8.27%) 130ms (± 9.63%) ~ 114ms 141ms p=0.195 n=6
Req 4 - navto 353ms (± 0.46%) 354ms (± 0.45%) ~ 352ms 356ms p=0.254 n=6
Req 5 - completionInfo count 2,071 (± 0.00%) 2,071 (± 0.00%) ~ 2,071 2,071 p=1.000 n=6
Req 5 - completionInfo 325ms (± 2.25%) 323ms (± 2.08%) ~ 317ms 332ms p=0.873 n=6
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • CompilerTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v16.17.1, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 155.45ms (± 0.16%) 155.37ms (± 0.16%) -0.08ms (- 0.05%) 154.35ms 158.39ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 230.89ms (± 0.14%) 230.79ms (± 0.12%) -0.10ms (- 0.04%) 229.72ms 234.54ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 234.84ms (± 0.11%) 236.04ms (± 0.13%) +1.20ms (+ 0.51%) 234.58ms 242.55ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 236.22ms (± 0.16%) 235.98ms (± 0.14%) -0.24ms (- 0.10%) 234.47ms 240.98ms p=0.000 n=600
System info unknown
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 pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@jakebailey
Copy link
Member Author

A percent, maybe?

@jakebailey
Copy link
Member Author

@typescript-bot perf test this full

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v16.17.1, x64)
Memory used 300,330k (± 0.01%) 300,234k (± 0.00%) -95k (- 0.03%) 300,221k 300,244k p=0.005 n=6
Parse Time 3.02s (± 0.44%) 3.02s (± 0.21%) ~ 3.01s 3.03s p=0.498 n=6
Bind Time 0.93s (± 0.00%) 0.93s (± 0.00%) ~ 0.93s 0.93s p=1.000 n=6
Check Time 9.47s (± 0.27%) 9.41s (± 0.32%) -0.06s (- 0.62%) 9.37s 9.46s p=0.014 n=6
Emit Time 7.63s (± 0.38%) 7.63s (± 0.42%) ~ 7.58s 7.66s p=1.000 n=6
Total Time 21.05s (± 0.16%) 20.99s (± 0.22%) ~ 20.94s 21.07s p=0.106 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,912k (± 0.01%) 193,927k (± 0.02%) ~ 193,854k 193,980k p=0.295 n=6
Parse Time 1.57s (± 1.27%) 1.56s (± 0.99%) ~ 1.55s 1.58s p=0.437 n=6
Bind Time 0.79s (± 0.00%) 0.79s (± 0.00%) ~ 0.79s 0.79s p=1.000 n=6
Check Time 9.95s (± 0.52%) 9.86s (± 0.29%) -0.09s (- 0.90%) 9.82s 9.89s p=0.005 n=6
Emit Time 2.74s (± 0.45%) 2.74s (± 0.20%) ~ 2.74s 2.75s p=0.441 n=6
Total Time 15.06s (± 0.41%) 14.96s (± 0.28%) -0.11s (- 0.71%) 14.90s 15.01s p=0.010 n=6
Monaco - node (v16.17.1, x64)
Memory used 347,128k (± 0.01%) 347,122k (± 0.01%) ~ 347,086k 347,159k p=0.470 n=6
Parse Time 2.68s (± 0.19%) 2.69s (± 0.20%) ~ 2.68s 2.69s p=0.640 n=6
Bind Time 0.99s (± 0.41%) 0.99s (± 0.00%) ~ 0.99s 0.99s p=0.405 n=6
Check Time 7.93s (± 0.34%) 7.92s (± 0.39%) ~ 7.87s 7.95s p=0.519 n=6
Emit Time 4.25s (± 0.32%) 4.26s (± 0.35%) ~ 4.24s 4.28s p=0.458 n=6
Total Time 15.86s (± 0.12%) 15.85s (± 0.21%) ~ 15.81s 15.89s p=0.871 n=6
TFS - node (v16.17.1, x64)
Memory used 301,133k (± 0.01%) 301,137k (± 0.00%) ~ 301,132k 301,148k p=0.872 n=6
Parse Time 2.18s (± 0.69%) 2.17s (± 0.71%) ~ 2.15s 2.19s p=0.510 n=6
Bind Time 1.11s (± 0.57%) 1.11s (± 0.37%) ~ 1.11s 1.12s p=0.673 n=6
Check Time 7.24s (± 0.27%) 7.19s (± 0.48%) -0.04s (- 0.62%) 7.15s 7.24s p=0.034 n=6
Emit Time 3.96s (± 0.19%) 3.99s (± 0.29%) +0.03s (+ 0.76%) 3.97s 4.00s p=0.006 n=6
Total Time 14.48s (± 0.23%) 14.46s (± 0.26%) ~ 14.40s 14.51s p=0.198 n=6
material-ui - node (v16.17.1, x64)
Memory used 479,464k (± 0.00%) 479,380k (± 0.00%) -84k (- 0.02%) 479,367k 479,392k p=0.005 n=6
Parse Time 3.15s (± 0.26%) 3.15s (± 0.26%) ~ 3.15s 3.17s p=0.218 n=6
Bind Time 0.91s (± 0.00%) 0.91s (± 0.45%) ~ 0.90s 0.91s p=0.405 n=6
Check Time 17.91s (± 0.29%) 17.92s (± 0.31%) ~ 17.84s 18.00s p=0.687 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.97s (± 0.22%) 21.98s (± 0.26%) ~ 21.90s 22.05s p=0.809 n=6
xstate - node (v16.17.1, x64)
Memory used 542,819k (± 0.01%) 542,781k (± 0.02%) ~ 542,707k 542,951k p=0.336 n=6
Parse Time 3.70s (± 0.20%) 3.70s (± 0.14%) ~ 3.69s 3.70s p=0.241 n=6
Bind Time 1.36s (± 3.75%) 1.36s (± 3.60%) ~ 1.34s 1.46s p=0.389 n=6
Check Time 3.30s (± 1.85%) 3.30s (± 2.47%) ~ 3.14s 3.36s p=0.629 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.44s (± 0.22%) 8.44s (± 0.43%) ~ 8.38s 8.48s p=1.000 n=6
Angular - node (v18.15.0, x64)
Memory used 301,153k (± 0.01%) 301,101k (± 0.01%) -52k (- 0.02%) 301,074k 301,114k p=0.005 n=6
Parse Time 2.86s (± 0.38%) 2.85s (± 0.37%) ~ 2.84s 2.87s p=0.554 n=6
Bind Time 0.85s (± 0.48%) 0.85s (± 0.60%) ~ 0.85s 0.86s p=0.595 n=6
Check Time 8.21s (± 0.34%) 8.16s (± 0.33%) -0.05s (- 0.63%) 8.12s 8.20s p=0.020 n=6
Emit Time 7.13s (± 0.33%) 7.14s (± 0.26%) ~ 7.13s 7.18s p=0.744 n=6
Total Time 19.05s (± 0.17%) 19.01s (± 0.14%) -0.04s (- 0.23%) 18.96s 19.04s p=0.029 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 193,704k (± 1.24%) 193,718k (± 1.22%) ~ 192,319k 198,133k p=0.689 n=6
Parse Time 1.48s (± 0.74%) 1.48s (± 1.13%) ~ 1.46s 1.50s p=0.867 n=6
Bind Time 0.74s (± 0.00%) 0.74s (± 0.00%) ~ 0.74s 0.74s p=1.000 n=6
Check Time 9.20s (± 0.24%) 9.14s (± 0.91%) ~ 9.02s 9.26s p=0.199 n=6
Emit Time 2.53s (± 0.75%) 2.55s (± 0.87%) ~ 2.53s 2.59s p=0.213 n=6
Total Time 13.95s (± 0.28%) 13.90s (± 0.54%) ~ 13.82s 14.02s p=0.228 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,939k (± 0.01%) 347,903k (± 0.01%) ~ 347,868k 347,943k p=0.128 n=6
Parse Time 2.52s (± 0.33%) 2.52s (± 0.65%) ~ 2.50s 2.54s p=0.804 n=6
Bind Time 0.94s (± 0.43%) 0.94s (± 0.87%) ~ 0.93s 0.95s p=0.584 n=6
Check Time 6.84s (± 0.45%) 6.83s (± 0.44%) ~ 6.79s 6.88s p=0.568 n=6
Emit Time 4.04s (± 0.53%) 4.06s (± 0.48%) ~ 4.04s 4.09s p=0.139 n=6
Total Time 14.35s (± 0.27%) 14.36s (± 0.28%) ~ 14.32s 14.43s p=1.000 n=6
TFS - node (v18.15.0, x64)
Memory used 301,987k (± 0.01%) 301,959k (± 0.00%) ~ 301,937k 301,975k p=0.230 n=6
Parse Time 2.05s (± 1.01%) 2.04s (± 0.37%) ~ 2.03s 2.05s p=0.319 n=6
Bind Time 1.02s (± 1.14%) 1.02s (± 0.80%) ~ 1.01s 1.03s p=0.738 n=6
Check Time 6.25s (± 0.19%) 6.18s (± 0.24%) -0.07s (- 1.12%) 6.16s 6.20s p=0.005 n=6
Emit Time 3.50s (± 0.69%) 3.47s (± 0.22%) ~ 3.46s 3.48s p=0.050 n=6
Total Time 12.82s (± 0.18%) 12.71s (± 0.19%) -0.10s (- 0.79%) 12.67s 12.74s p=0.005 n=6
material-ui - node (v18.15.0, x64)
Memory used 480,316k (± 0.01%) 480,259k (± 0.01%) -57k (- 0.01%) 480,237k 480,316k p=0.013 n=6
Parse Time 2.94s (± 1.74%) 2.97s (± 1.82%) ~ 2.86s 3.01s p=0.413 n=6
Bind Time 0.90s (± 6.06%) 0.89s (± 5.73%) ~ 0.86s 0.99s p=0.546 n=6
Check Time 16.70s (± 0.61%) 16.80s (± 0.41%) ~ 16.70s 16.85s p=0.124 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.54s (± 0.49%) 20.66s (± 0.36%) ~ 20.54s 20.71s p=0.092 n=6
xstate - node (v18.15.0, x64)
Memory used 545,723k (± 0.02%) 545,642k (± 0.02%) ~ 545,554k 545,796k p=0.173 n=6
Parse Time 3.52s (± 0.31%) 3.52s (± 0.18%) ~ 3.51s 3.53s p=0.787 n=6
Bind Time 1.49s (± 0.82%) 1.49s (± 0.56%) ~ 1.47s 1.49s p=0.934 n=6
Check Time 2.80s (± 0.58%) 2.77s (± 0.90%) -0.04s (- 1.31%) 2.74s 2.81s p=0.030 n=6
Emit Time 0.08s (± 9.60%) 0.07s (± 7.03%) ~ 0.07s 0.08s p=0.247 n=6
Total Time 7.89s (± 0.23%) 7.85s (± 0.30%) -0.04s (- 0.55%) 7.82s 7.88s p=0.016 n=6
Angular - node (v20.5.1, x64)
Memory used 312,750k (± 0.00%) 312,650k (± 0.01%) -100k (- 0.03%) 312,593k 312,684k p=0.005 n=6
Parse Time 3.04s (± 0.38%) 3.04s (± 0.48%) ~ 3.03s 3.06s p=0.933 n=6
Bind Time 0.89s (± 0.84%) 0.89s (± 0.46%) ~ 0.89s 0.90s p=1.000 n=6
Check Time 7.75s (± 0.21%) 7.71s (± 0.27%) -0.03s (- 0.43%) 7.68s 7.74s p=0.019 n=6
Emit Time 7.37s (± 0.16%) 7.35s (± 0.18%) -0.02s (- 0.25%) 7.33s 7.37s p=0.032 n=6
Total Time 19.05s (± 0.15%) 19.00s (± 0.17%) -0.05s (- 0.26%) 18.95s 19.04s p=0.030 n=6
Compiler-Unions - node (v20.5.1, x64)
Memory used 192,773k (± 1.57%) 195,089k (± 1.29%) ~ 190,735k 196,697k p=0.575 n=6
Parse Time 1.54s (± 0.34%) 1.54s (± 0.79%) ~ 1.53s 1.56s p=0.533 n=6
Bind Time 0.78s (± 0.00%) 0.78s (± 0.00%) ~ 0.78s 0.78s p=1.000 n=6
Check Time 8.69s (± 0.35%) 8.63s (± 0.37%) -0.06s (- 0.69%) 8.60s 8.69s p=0.030 n=6
Emit Time 2.62s (± 0.71%) 2.64s (± 0.54%) ~ 2.62s 2.66s p=0.139 n=6
Total Time 13.62s (± 0.32%) 13.58s (± 0.24%) ~ 13.55s 13.64s p=0.148 n=6
Monaco - node (v20.5.1, x64)
Memory used 352,282k (± 0.01%) 352,258k (± 0.00%) ~ 352,245k 352,264k p=0.066 n=6
Parse Time 2.63s (± 0.32%) 2.61s (± 0.29%) -0.01s (- 0.51%) 2.60s 2.62s p=0.020 n=6
Bind Time 0.96s (± 2.08%) 0.97s (± 1.41%) ~ 0.95s 0.98s p=0.676 n=6
Check Time 6.80s (± 0.44%) 6.79s (± 0.25%) ~ 6.77s 6.82s p=0.683 n=6
Emit Time 3.87s (± 0.52%) 3.87s (± 0.33%) ~ 3.86s 3.89s p=0.869 n=6
Total Time 14.26s (± 0.22%) 14.24s (± 0.22%) ~ 14.20s 14.27s p=0.686 n=6
TFS - node (v20.5.1, x64)
Memory used 301,773k (± 0.00%) 301,749k (± 0.01%) ~ 301,707k 301,779k p=0.128 n=6
Parse Time 2.03s (± 0.90%) 2.05s (± 1.32%) ~ 2.02s 2.10s p=0.254 n=6
Bind Time 1.05s (± 1.04%) 1.05s (± 2.12%) ~ 1.02s 1.08s p=1.000 n=6
Check Time 6.09s (± 0.37%) 6.04s (± 0.14%) -0.05s (- 0.90%) 6.03s 6.05s p=0.006 n=6
Emit Time 3.77s (± 0.41%) 3.74s (± 0.39%) -0.03s (- 0.75%) 3.73s 3.77s p=0.020 n=6
Total Time 12.94s (± 0.25%) 12.88s (± 0.36%) ~ 12.83s 12.94s p=0.053 n=6
material-ui - node (v20.5.1, x64)
Memory used 485,190k (± 0.01%) 485,137k (± 0.01%) -52k (- 0.01%) 485,087k 485,156k p=0.045 n=6
Parse Time 3.07s (± 0.24%) 3.07s (± 0.29%) ~ 3.06s 3.08s p=0.798 n=6
Bind Time 1.04s (± 0.72%) 1.05s (± 1.16%) ~ 1.04s 1.07s p=0.209 n=6
Check Time 15.87s (± 0.45%) 15.87s (± 0.46%) ~ 15.80s 16.00s p=0.873 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 19.99s (± 0.36%) 19.99s (± 0.35%) ~ 19.93s 20.12s p=0.936 n=6
xstate - node (v20.5.1, x64)
Memory used 544,698k (± 0.01%) 544,588k (± 0.01%) -110k (- 0.02%) 544,519k 544,698k p=0.020 n=6
Parse Time 3.70s (± 0.43%) 3.72s (± 0.51%) ~ 3.70s 3.74s p=0.086 n=6
Bind Time 1.54s (± 0.90%) 1.55s (± 1.40%) ~ 1.52s 1.58s p=0.413 n=6
Check Time 2.85s (± 0.48%) 2.85s (± 0.19%) ~ 2.84s 2.85s p=0.445 n=6
Emit Time 0.14s (± 8.44%) 0.13s (±10.24%) ~ 0.12s 0.15s p=0.212 n=6
Total Time 8.24s (± 0.21%) 8.25s (± 0.37%) ~ 8.21s 8.28s p=0.295 n=6
System info unknown
Hosts
  • node (v16.17.1, x64)
  • node (v18.15.0, x64)
  • node (v20.5.1, x64)
Scenarios
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
  • Angular - node (v20.5.1, x64)
  • Compiler-Unions - node (v20.5.1, x64)
  • Monaco - node (v20.5.1, x64)
  • TFS - node (v20.5.1, x64)
  • material-ui - node (v20.5.1, x64)
  • xstate - node (v20.5.1, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,492ms (± 0.06%) 2,490ms (± 0.25%) ~ 2,481ms 2,496ms p=0.935 n=6
Req 2 - geterr 5,962ms (± 0.43%) 5,950ms (± 0.43%) ~ 5,923ms 5,990ms p=0.378 n=6
Req 3 - references 345ms (± 1.44%) 342ms (± 0.69%) ~ 338ms 345ms p=0.466 n=6
Req 4 - navto 278ms (± 0.81%) 279ms (± 0.92%) ~ 277ms 282ms p=0.167 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 83ms (± 7.91%) 82ms (± 4.70%) ~ 76ms 88ms p=0.936 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,630ms (± 0.76%) 2,621ms (± 0.65%) ~ 2,600ms 2,641ms p=0.521 n=6
Req 2 - geterr 4,767ms (± 0.31%) 4,740ms (± 0.18%) -27ms (- 0.56%) 4,734ms 4,755ms p=0.010 n=6
Req 3 - references 350ms (± 0.12%) 350ms (± 0.33%) ~ 349ms 352ms p=0.787 n=6
Req 4 - navto 269ms (± 0.51%) 271ms (± 1.37%) ~ 268ms 278ms p=0.241 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 (± 3.02%) 79ms (± 0.52%) ~ 78ms 79ms p=0.214 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,714ms (± 0.16%) 2,716ms (± 0.06%) ~ 2,714ms 2,718ms p=0.572 n=6
Req 2 - geterr 1,939ms (± 1.94%) 1,953ms (± 1.77%) ~ 1,889ms 1,981ms p=0.378 n=6
Req 3 - references 132ms (± 8.68%) 140ms (± 2.21%) ~ 134ms 143ms p=0.305 n=6
Req 4 - navto 353ms (± 0.44%) 353ms (± 0.24%) ~ 352ms 354ms p=0.652 n=6
Req 5 - completionInfo count 2,071 (± 0.00%) 2,071 (± 0.00%) ~ 2,071 2,071 p=1.000 n=6
Req 5 - completionInfo 320ms (± 2.25%) 326ms (± 2.00%) ~ 317ms 332ms p=0.127 n=6
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • CompilerTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v16.17.1, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 155.64ms (± 0.16%) 155.40ms (± 0.15%) -0.24ms (- 0.16%) 154.27ms 158.11ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 230.87ms (± 0.14%) 230.58ms (± 0.11%) -0.29ms (- 0.12%) 229.60ms 233.86ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 234.92ms (± 0.15%) 235.83ms (± 0.13%) +0.91ms (+ 0.39%) 234.41ms 239.09ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 235.78ms (± 0.10%) 235.79ms (± 0.13%) ~ 234.64ms 240.93ms p=0.958 n=600
System info unknown
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 pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@jakebailey jakebailey marked this pull request as ready for review August 22, 2023 20:31
@jakebailey
Copy link
Member Author

I'm going to take this out of draft as I think that even if it's at most a percent, we really kinda need a lot of small 1% wins. Curious what you all think here.

@@ -26110,7 +26110,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
resolved.members.get("bind" as __String) && isTypeSubtypeOf(type, globalFunctionType));
}

function getTypeFacts(type: Type): TypeFacts {
function getTypeFacts(type: Type, mask: TypeFacts): TypeFacts {
Copy link
Member Author

Choose a reason for hiding this comment

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

I kept the name, but maybe it deserves to be called something else.

@jakebailey
Copy link
Member Author

@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
Copy link
Collaborator

typescript-bot commented Aug 22, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, it looks like the DT test run failed. Please check the log for more details.
You can check the log here.

@jakebailey jakebailey merged commit 91c0d7f into microsoft:main Aug 24, 2023
19 checks passed
@jakebailey jakebailey deleted the faster-type-facts branch August 24, 2023 17:12
snovader pushed a commit to mestro-se/TypeScript that referenced this pull request Sep 23, 2023
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
Development

Successfully merging this pull request may close these issues.

3 participants