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

Use lookup tables for common functions on node kinds. #59954

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DanielRosenwasser
Copy link
Member

No description provided.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Sep 13, 2024
@DanielRosenwasser
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 13, 2024

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

Command Status Results
perf test this ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser
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,382k (± 0.03%) 193,113k (± 0.78%) ~ 192,404k 196,188k p=0.093 n=6
Parse Time 1.58s (± 0.65%) 1.57s (± 1.33%) ~ 1.55s 1.60s p=0.516 n=6
Bind Time 0.86s (± 1.20%) 0.85s (± 1.43%) ~ 0.83s 0.86s p=0.180 n=6
Check Time 11.38s (± 0.47%) 11.36s (± 0.34%) ~ 11.29s 11.39s p=0.170 n=6
Emit Time 3.23s (± 0.82%) 3.28s (± 0.53%) +0.05s (+ 1.39%) 3.25s 3.29s p=0.014 n=6
Total Time 17.05s (± 0.32%) 17.05s (± 0.32%) ~ 16.97s 17.13s p=0.809 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,753 945,753 ~ ~ ~ p=1.000 n=6
Types 410,067 410,067 ~ ~ ~ p=1.000 n=6
Memory used 1,222,762k (± 0.00%) 1,222,772k (± 0.00%) ~ 1,222,705k 1,222,819k p=0.575 n=6
Parse Time 6.68s (± 0.46%) 6.68s (± 0.26%) ~ 6.65s 6.70s p=0.934 n=6
Bind Time 1.87s (± 0.45%) 1.85s (± 0.34%) -0.01s (- 0.80%) 1.84s 1.86s p=0.018 n=6
Check Time 31.20s (± 0.30%) 31.36s (± 1.07%) ~ 31.13s 31.98s p=0.575 n=6
Emit Time 15.10s (± 0.49%) 15.08s (± 0.99%) ~ 14.82s 15.25s p=1.000 n=6
Total Time 54.85s (± 0.24%) 54.98s (± 0.72%) ~ 54.57s 55.67s p=0.630 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,529,234 2,529,234 ~ ~ ~ p=1.000 n=6
Types 935,840 935,840 ~ ~ ~ p=1.000 n=6
Memory used 2,364,184k (± 0.00%) 2,364,281k (± 0.00%) +97k (+ 0.00%) 2,364,239k 2,364,343k p=0.005 n=6
Parse Time 11.16s (± 0.27%) 11.16s (± 0.28%) ~ 11.13s 11.21s p=1.000 n=6
Bind Time 2.62s (± 0.95%) 2.60s (± 0.29%) ~ 2.59s 2.61s p=0.118 n=6
Check Time 86.23s (± 0.72%) 86.46s (± 0.42%) ~ 86.11s 87.00s p=0.810 n=6
Emit Time 0.33s (± 1.58%) 0.33s ~ ~ ~ p=0.174 n=6
Total Time 100.33s (± 0.63%) 100.55s (± 0.35%) ~ 100.20s 101.07s p=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,250,418 1,250,464 +46 (+ 0.00%) ~ ~ p=0.001 n=6
Types 265,229 265,252 +23 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 2,403,396k (± 0.04%) 2,403,117k (± 0.03%) ~ 2,402,098k 2,404,002k p=0.471 n=6
Parse Time 6.10s (± 0.74%) 6.08s (± 1.04%) ~ 5.99s 6.15s p=0.936 n=6
Bind Time 2.28s (± 0.43%) 2.26s (± 0.63%) ~ 2.24s 2.28s p=0.085 n=6
Check Time 41.01s (± 0.65%) 41.20s (± 0.68%) ~ 40.97s 41.69s p=0.230 n=6
Emit Time 3.94s (± 1.50%) 4.05s (± 3.87%) ~ 3.92s 4.31s p=0.423 n=6
Total Time 53.35s (± 0.61%) 53.61s (± 0.52%) ~ 53.24s 54.00s p=0.109 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,250,418 1,250,464 +46 (+ 0.00%) ~ ~ p=0.001 n=6
Types 265,229 265,252 +23 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 2,478,014k (± 0.04%) 2,477,795k (± 0.04%) ~ 2,476,930k 2,479,546k p=0.471 n=6
Parse Time 7.82s (± 0.66%) 7.83s (± 0.80%) ~ 7.74s 7.89s p=0.689 n=6
Bind Time 2.53s (± 0.30%) 2.52s (± 1.56%) ~ 2.47s 2.56s p=1.000 n=6
Check Time 51.28s (± 0.91%) 51.21s (± 0.58%) ~ 50.96s 51.69s p=0.936 n=6
Emit Time 4.90s (± 0.48%) 4.99s (± 4.67%) ~ 4.73s 5.42s p=0.520 n=6
Total Time 66.56s (± 0.71%) 66.56s (± 0.53%) ~ 66.01s 67.01s p=1.000 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 259,449 259,495 +46 (+ 0.02%) ~ ~ p=0.001 n=6
Types 105,986 106,009 +23 (+ 0.02%) ~ ~ p=0.001 n=6
Memory used 433,840k (± 0.01%) 433,937k (± 0.03%) ~ 433,858k 434,232k p=0.230 n=6
Parse Time 3.42s (± 0.82%) 3.41s (± 0.75%) ~ 3.38s 3.44s p=0.468 n=6
Bind Time 1.27s (± 0.43%) 1.26s (± 1.08%) ~ 1.25s 1.29s p=0.057 n=6
Check Time 18.12s (± 0.59%) 18.15s (± 0.27%) ~ 18.07s 18.21s p=0.336 n=6
Emit Time 1.65s (± 1.29%) 1.64s (± 0.67%) ~ 1.63s 1.66s p=0.252 n=6
Total Time 24.47s (± 0.33%) 24.46s (± 0.23%) ~ 24.38s 24.53s p=1.000 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,018 225,018 ~ ~ ~ p=1.000 n=6
Types 94,249 94,249 ~ ~ ~ p=1.000 n=6
Memory used 370,215k (± 0.02%) 370,246k (± 0.02%) ~ 370,178k 370,390k p=0.936 n=6
Parse Time 3.43s (± 0.80%) 3.42s (± 0.31%) ~ 3.41s 3.44s p=1.000 n=6
Bind Time 1.91s (± 1.38%) 1.92s (± 0.55%) ~ 1.90s 1.93s p=0.935 n=6
Check Time 19.50s (± 0.61%) 19.43s (± 0.36%) ~ 19.34s 19.52s p=0.377 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.85s (± 0.41%) 24.77s (± 0.29%) ~ 24.67s 24.87s p=0.261 n=6
vscode - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 3,060,029 3,060,029 ~ ~ ~ p=1.000 n=6
Types 1,057,381 1,057,381 ~ ~ ~ p=1.000 n=6
Memory used 3,167,349k (± 0.00%) 3,167,382k (± 0.00%) ~ 3,167,280k 3,167,477k p=0.575 n=6
Parse Time 13.85s (± 0.53%) 13.82s (± 0.38%) ~ 13.74s 13.88s p=0.575 n=6
Bind Time 4.31s (± 0.25%) 4.26s (± 0.28%) -0.05s (- 1.24%) 4.24s 4.27s p=0.004 n=6
Check Time 81.22s (± 0.28%) 81.05s (± 0.24%) ~ 80.70s 81.20s p=0.261 n=6
Emit Time 22.03s (± 0.48%) 22.08s (± 0.40%) ~ 21.95s 22.19s p=0.470 n=6
Total Time 121.42s (± 0.21%) 121.20s (± 0.17%) ~ 120.81s 121.35s p=0.377 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 277,156 277,156 ~ ~ ~ p=1.000 n=6
Types 112,946 112,946 ~ ~ ~ p=1.000 n=6
Memory used 426,959k (± 0.02%) 427,023k (± 0.02%) ~ 426,952k 427,189k p=0.298 n=6
Parse Time 4.91s (± 0.61%) 4.87s (± 0.48%) ~ 4.84s 4.90s p=0.053 n=6
Bind Time 2.13s (± 0.69%) 2.09s (± 0.99%) -0.04s (- 1.72%) 2.07s 2.12s p=0.012 n=6
Check Time 21.87s (± 0.40%) 21.97s (± 0.26%) ~ 21.88s 22.04s p=0.078 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 28.91s (± 0.30%) 28.94s (± 0.21%) ~ 28.87s 29.01s p=0.520 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 539,317 539,317 ~ ~ ~ p=1.000 n=6
Types 178,997 178,997 ~ ~ ~ p=1.000 n=6
Memory used 484,323k (± 0.02%) 484,217k (± 0.02%) ~ 484,069k 484,317k p=0.128 n=6
Parse Time 2.84s (± 0.43%) 2.84s (± 0.35%) ~ 2.83s 2.85s p=0.865 n=6
Bind Time 1.05s 1.04s (± 0.79%) -0.01s (- 1.27%) 1.02s 1.04s p=0.002 n=6
Check Time 15.49s (± 0.32%) 15.53s (± 0.39%) ~ 15.47s 15.63s p=0.470 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 19.39s (± 0.28%) 19.41s (± 0.33%) ~ 19.35s 19.52s p=0.748 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

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,286ms (± 1.32%) 2,291ms (± 0.56%) ~ 2,274ms 2,302ms p=0.936 n=6
Req 2 - geterr 5,176ms (± 0.55%) 5,182ms (± 0.40%) ~ 5,164ms 5,220ms p=0.689 n=6
Req 3 - references 261ms (± 0.61%) 287ms (± 0.48%) 🔻+25ms (+ 9.70%) 285ms 288ms p=0.004 n=6
Req 4 - navto 227ms (± 0.48%) 225ms (± 0.67%) ~ 223ms 227ms p=0.063 n=6
Req 5 - completionInfo count 1,357 1,357 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 85ms (± 6.20%) 86ms (± 3.74%) ~ 80ms 90ms p=1.000 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,399ms (± 1.22%) 2,420ms (± 0.47%) ~ 2,409ms 2,439ms p=0.066 n=6
Req 2 - geterr 3,918ms (± 0.16%) 3,921ms (± 0.23%) ~ 3,908ms 3,933ms p=0.630 n=6
Req 3 - references 275ms (± 1.02%) 298ms (± 0.60%) 🔻+23ms (+ 8.23%) 295ms 300ms p=0.005 n=6
Req 4 - navto 227ms (± 0.28%) 226ms (± 0.53%) ~ 225ms 228ms p=0.344 n=6
Req 5 - completionInfo count 1,519 1,519 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 76ms (± 6.12%) 79ms (± 7.54%) ~ 73ms 86ms p=0.222 n=6
xstate-main-1-tsserver - node (v18.15.0, x64)
Req 1 - updateOpen 7,729ms (± 0.30%) 7,734ms (± 0.09%) ~ 7,723ms 7,743ms p=0.936 n=6
Req 2 - geterr 1,685ms (± 1.01%) 1,696ms (± 1.24%) ~ 1,678ms 1,733ms p=0.521 n=6
Req 3 - references 127ms (± 0.81%) 127ms (± 1.07%) ~ 126ms 129ms p=0.933 n=6
Req 4 - navto 596ms (± 2.13%) 603ms (± 2.10%) ~ 585ms 622ms p=0.378 n=6
Req 5 - completionInfo count 3,444 3,444 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 1,272ms (± 1.30%) 1,269ms (± 0.41%) ~ 1,259ms 1,274ms p=0.630 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstate-main-1-tsserver - node (v18.15.0, 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 (v18.15.0, x64)
Execution time 158.40ms (± 0.17%) 158.38ms (± 0.19%) ~ 157.24ms 162.92ms p=0.155 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 232.26ms (± 0.13%) 232.41ms (± 0.13%) +0.15ms (+ 0.06%) 231.15ms 236.03ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 279.03ms (± 0.28%) 279.21ms (± 0.28%) +0.18ms (+ 0.06%) 272.28ms 285.68ms p=0.000 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 227.36ms (± 0.16%) 227.59ms (± 0.22%) +0.23ms (+ 0.10%) 226.12ms 244.21ms p=0.000 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@DanielRosenwasser
Copy link
Member Author

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 13, 2024

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

Command Status Results
perf test this ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser
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 193,203k (± 0.73%) 193,731k (± 0.95%) ~ 192,438k 196,172k p=0.936 n=6
Parse Time 1.57s (± 0.80%) 1.58s (± 1.48%) ~ 1.55s 1.61s p=0.935 n=6
Bind Time 0.86s (± 0.88%) 0.85s (± 1.21%) ~ 0.84s 0.87s p=0.351 n=6
Check Time 11.37s (± 0.28%) 11.39s (± 0.42%) ~ 11.33s 11.45s p=0.519 n=6
Emit Time 3.22s (± 1.51%) 3.24s (± 0.50%) ~ 3.22s 3.27s p=0.510 n=6
Total Time 17.01s (± 0.36%) 17.06s (± 0.27%) ~ 17.01s 17.12s p=0.226 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,753 945,753 ~ ~ ~ p=1.000 n=6
Types 410,067 410,067 ~ ~ ~ p=1.000 n=6
Memory used 1,222,726k (± 0.00%) 1,222,788k (± 0.00%) +62k (+ 0.01%) 1,222,735k 1,222,857k p=0.013 n=6
Parse Time 7.91s (± 0.50%) 7.92s (± 0.23%) ~ 7.90s 7.95s p=0.418 n=6
Bind Time 2.23s (± 0.34%) 2.21s (± 0.37%) -0.02s (- 0.97%) 2.20s 2.22s p=0.007 n=6
Check Time 36.40s (± 0.47%) 36.46s (± 0.30%) ~ 36.32s 36.60s p=0.378 n=6
Emit Time 17.89s (± 0.52%) 17.89s (± 0.59%) ~ 17.77s 18.07s p=1.000 n=6
Total Time 64.43s (± 0.35%) 64.48s (± 0.31%) ~ 64.20s 64.70s p=0.689 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,529,274 2,529,274 ~ ~ ~ p=1.000 n=6
Types 935,839 935,839 ~ ~ ~ p=1.000 n=6
Memory used 2,364,198k (± 0.00%) 2,364,285k (± 0.00%) +87k (+ 0.00%) 2,364,236k 2,364,350k p=0.005 n=6
Parse Time 11.15s (± 0.41%) 11.14s (± 0.10%) ~ 11.13s 11.16s p=0.256 n=6
Bind Time 2.61s (± 0.45%) 2.58s (± 0.35%) -0.03s (- 1.21%) 2.57s 2.59s p=0.005 n=6
Check Time 86.36s (± 0.53%) 86.14s (± 0.22%) ~ 85.96s 86.50s p=0.521 n=6
Emit Time 0.33s (± 1.23%) 0.33s (± 1.91%) ~ 0.32s 0.34s p=0.673 n=6
Total Time 100.45s (± 0.45%) 100.20s (± 0.20%) ~ 99.99s 100.57s p=0.378 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,250,418 1,250,466 +48 (+ 0.00%) ~ ~ p=0.001 n=6
Types 265,229 265,141 -88 (- 0.03%) ~ ~ p=0.001 n=6
Memory used 2,403,295k (± 0.05%) 2,641,156k (±13.95%) ~ 2,402,279k 3,117,944k p=0.471 n=6
Parse Time 6.10s (± 0.85%) 6.15s (± 1.45%) ~ 6.03s 6.30s p=0.296 n=6
Bind Time 2.27s (± 0.99%) 2.24s (± 0.99%) -0.03s (- 1.39%) 2.21s 2.28s p=0.027 n=6
Check Time 40.90s (± 0.51%) 41.17s (± 0.52%) ~ 40.79s 41.33s p=0.093 n=6
Emit Time 4.03s (± 4.38%) 4.01s (± 1.92%) ~ 3.92s 4.15s p=0.810 n=6
Total Time 53.32s (± 0.47%) 53.58s (± 0.32%) ~ 53.34s 53.82s p=0.066 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,250,418 1,250,466 +48 (+ 0.00%) ~ ~ p=0.001 n=6
Types 265,229 265,141 -88 (- 0.03%) ~ ~ p=0.001 n=6
Memory used 2,478,058k (± 0.05%) 2,478,106k (± 0.04%) ~ 2,477,109k 2,479,363k p=0.936 n=6
Parse Time 7.87s (± 1.11%) 7.86s (± 0.98%) ~ 7.78s 7.99s p=0.810 n=6
Bind Time 2.53s (± 0.46%) 2.51s (± 0.53%) -0.02s (- 0.79%) 2.49s 2.53s p=0.032 n=6
Check Time 51.35s (± 0.97%) 50.96s (± 0.55%) -0.39s (- 0.75%) 50.66s 51.49s p=0.031 n=6
Emit Time 5.01s (± 3.18%) 5.08s (± 5.17%) ~ 4.80s 5.40s p=0.936 n=6
Total Time 66.77s (± 0.75%) 66.40s (± 0.63%) ~ 65.80s 66.88s p=0.298 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 259,449 259,497 +48 (+ 0.02%) ~ ~ p=0.001 n=6
Types 105,986 105,898 -88 (- 0.08%) ~ ~ p=0.001 n=6
Memory used 433,909k (± 0.02%) 433,601k (± 0.01%) -308k (- 0.07%) 433,576k 433,630k p=0.005 n=6
Parse Time 3.43s (± 0.75%) 3.40s (± 0.97%) ~ 3.37s 3.46s p=0.170 n=6
Bind Time 1.28s (± 0.59%) 1.26s (± 0.41%) -0.01s (- 1.17%) 1.26s 1.27s p=0.010 n=6
Check Time 18.09s (± 0.31%) 17.99s (± 0.31%) -0.11s (- 0.59%) 17.90s 18.06s p=0.016 n=6
Emit Time 1.65s (± 0.51%) 1.65s (± 0.99%) ~ 1.63s 1.67s p=1.000 n=6
Total Time 24.44s (± 0.13%) 24.30s (± 0.28%) -0.15s (- 0.60%) 24.19s 24.37s p=0.005 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,018 225,018 ~ ~ ~ p=1.000 n=6
Types 94,249 94,249 ~ ~ ~ p=1.000 n=6
Memory used 370,211k (± 0.02%) 370,272k (± 0.02%) ~ 370,172k 370,401k p=0.378 n=6
Parse Time 3.45s (± 1.19%) 3.43s (± 0.77%) ~ 3.39s 3.47s p=0.418 n=6
Bind Time 1.93s (± 1.20%) 1.91s (± 0.80%) ~ 1.88s 1.92s p=0.059 n=6
Check Time 19.44s (± 0.26%) 19.46s (± 0.29%) ~ 19.41s 19.55s p=1.000 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.82s (± 0.21%) 24.79s (± 0.27%) ~ 24.70s 24.90s p=0.261 n=6
vscode - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 3,060,029 3,060,029 ~ ~ ~ p=1.000 n=6
Types 1,057,381 1,057,381 ~ ~ ~ p=1.000 n=6
Memory used 3,167,363k (± 0.00%) 3,167,457k (± 0.00%) +94k (+ 0.00%) 3,167,408k 3,167,501k p=0.013 n=6
Parse Time 13.84s (± 0.23%) 13.83s (± 0.35%) ~ 13.78s 13.91s p=0.687 n=6
Bind Time 4.32s (± 1.10%) 4.26s (± 0.35%) -0.06s (- 1.43%) 4.24s 4.28s p=0.005 n=6
Check Time 81.03s (± 0.33%) 80.88s (± 0.24%) ~ 80.58s 81.07s p=0.296 n=6
Emit Time 22.03s (± 0.71%) 22.04s (± 0.41%) ~ 21.93s 22.17s p=1.000 n=6
Total Time 121.23s (± 0.33%) 121.01s (± 0.25%) ~ 120.58s 121.30s p=0.298 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 277,156 277,156 ~ ~ ~ p=1.000 n=6
Types 112,946 112,946 ~ ~ ~ p=1.000 n=6
Memory used 426,942k (± 0.02%) 427,020k (± 0.01%) ~ 426,976k 427,092k p=0.148 n=6
Parse Time 4.90s (± 0.55%) 4.87s (± 0.35%) ~ 4.84s 4.89s p=0.053 n=6
Bind Time 2.15s (± 0.62%) 2.11s (± 0.39%) -0.04s (- 1.94%) 2.10s 2.12s p=0.004 n=6
Check Time 21.76s (± 0.37%) 21.98s (± 0.48%) +0.22s (+ 1.00%) 21.83s 22.14s p=0.008 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 28.81s (± 0.32%) 28.96s (± 0.41%) ~ 28.79s 29.13s p=0.064 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 539,317 539,317 ~ ~ ~ p=1.000 n=6
Types 178,997 178,997 ~ ~ ~ p=1.000 n=6
Memory used 484,263k (± 0.03%) 484,286k (± 0.03%) ~ 484,159k 484,461k p=1.000 n=6
Parse Time 2.84s (± 0.61%) 2.82s (± 0.61%) ~ 2.80s 2.85s p=0.146 n=6
Bind Time 1.04s (± 0.99%) 1.03s (± 1.00%) ~ 1.02s 1.04s p=0.113 n=6
Check Time 15.50s (± 0.37%) 15.53s (± 0.15%) ~ 15.50s 15.55s p=0.375 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 19.38s (± 0.25%) 19.39s (± 0.17%) ~ 19.34s 19.43s p=1.000 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

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,291ms (± 0.30%) 2,297ms (± 0.52%) ~ 2,273ms 2,305ms p=0.173 n=6
Req 2 - geterr 5,173ms (± 0.57%) 5,189ms (± 0.30%) ~ 5,172ms 5,215ms p=0.149 n=6
Req 3 - references 263ms (± 0.97%) 284ms (± 0.26%) 🔻+21ms (+ 8.12%) 283ms 285ms p=0.004 n=6
Req 4 - navto 227ms (± 0.18%) 227ms (± 0.54%) ~ 224ms 227ms p=0.218 n=6
Req 5 - completionInfo count 1,357 1,357 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 80ms (± 5.76%) 85ms (± 3.32%) ~ 79ms 87ms p=0.161 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,426ms (± 0.94%) 2,425ms (± 0.66%) ~ 2,410ms 2,454ms p=0.936 n=6
Req 2 - geterr 3,926ms (± 0.15%) 3,923ms (± 0.30%) ~ 3,902ms 3,932ms p=0.935 n=6
Req 3 - references 275ms (± 1.72%) 294ms (± 0.47%) 🔻+19ms (+ 6.92%) 292ms 296ms p=0.005 n=6
Req 4 - navto 232ms (± 2.73%) 227ms (± 0.33%) -5ms (- 2.16%) 226ms 228ms p=0.024 n=6
Req 5 - completionInfo count 1,519 1,519 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 78ms (±10.80%) 78ms (± 6.48%) ~ 74ms 85ms p=1.000 n=6
xstate-main-1-tsserver - node (v18.15.0, x64)
Req 1 - updateOpen 5,199ms (± 0.24%) 5,174ms (± 0.43%) ~ 5,148ms 5,208ms p=0.066 n=6
Req 2 - geterr 1,128ms (± 0.87%) 1,136ms (± 0.74%) ~ 1,127ms 1,149ms p=0.260 n=6
Req 3 - references 87ms (± 2.35%) 86ms (± 5.16%) ~ 79ms 91ms p=0.787 n=6
Req 4 - navto 443ms (± 0.12%) 442ms (± 0.19%) -1ms (- 0.26%) 441ms 443ms p=0.033 n=6
Req 5 - completionInfo count 3,444 3,444 ~ ~ ~ p=1.000 n=6
Req 5 - completionInfo 847ms (± 1.25%) 848ms (± 0.93%) ~ 837ms 856ms p=1.000 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstate-main-1-tsserver - node (v18.15.0, 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 (v18.15.0, x64)
Execution time 158.23ms (± 0.18%) 158.41ms (± 0.19%) +0.17ms (+ 0.11%) 157.33ms 163.38ms p=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 233.31ms (± 0.13%) 233.57ms (± 0.12%) +0.27ms (+ 0.11%) 232.29ms 235.18ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 228.96ms (± 0.14%) 229.37ms (± 0.14%) +0.41ms (+ 0.18%) 227.91ms 233.63ms p=0.000 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 227.27ms (± 0.20%) 227.59ms (± 0.15%) +0.32ms (+ 0.14%) 226.24ms 231.10ms p=0.000 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

IsExpression = StrictlyMiscellaneousExpression | IsUnaryExpression,
}

const nodeKindFacts: NodeKindFacts[] = [];
Copy link
Member

Choose a reason for hiding this comment

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

I think you'd actually have better perf filling pre-filling this with numbers to get one of those special compact arrays

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'm pretty sure that happens today with push according to https://v8.dev/blog/elements-kinds and this test:

let x = [];

console.log("Unfilled:");
%DebugPrint(x);

for (let i = 0; i < 10; i++) {
    x.push(i);
}

console.log("Filled:");
%DebugPrint(x);
Output
Unfilled:
DebugPrint: 0xcfb0004ab5d: [JSArray]
 - map: 0x0cfb0018e6b9 <Map[16](PACKED_SMI_ELEMENTS)> [FastProperties]
 - prototype: 0x0cfb0018e92d <JSArray[0]>
 - elements: 0x0cfb000006cd <FixedArray[0]> [PACKED_SMI_ELEMENTS]
 - length: 0
 - properties: 0x0cfb000006cd <FixedArray[0]>
 - All own properties (excluding elements): {
    0xcfb00000d41: [String] in ReadOnlySpace: #length: 0x0cfb0028741d <AccessorInfo name= 0x0cfb00000d41 <String[6]: #length>, data= 0x0cfb00000061 <undefined>> (const accessor descriptor), location: descriptor
 }
0xcfb0018e6b9: [Map] in OldSpace
 - map: 0x0cfb00183c35 <MetaMap (0x0cfb00183c85 <NativeContext[285]>)>
 - type: JS_ARRAY_TYPE
 - instance size: 16
 - inobject properties: 0
 - unused property fields: 0
 - elements kind: PACKED_SMI_ELEMENTS
 - enum length: invalid
 - back pointer: 0x0cfb00000061 <undefined>
 - prototype_validity cell: 0x0cfb00000a31 <Cell value= 1>
 - instance descriptors #1: 0x0cfb0018ef45 <DescriptorArray[1]>
 - transitions #1: 0x0cfb0018ef61 <TransitionArray[4]>Transition array #1:
     0x0cfb00000e05 <Symbol: (elements_transition_symbol)>: (transition to HOLEY_SMI_ELEMENTS) -> 0x0cfb0018ef79 <Map[16](HOLEY_SMI_ELEMENTS)>

 - prototype: 0x0cfb0018e92d <JSArray[0]>
 - constructor: 0x0cfb0018e625 <JSFunction Array (sfi = 0xcfb0028c6ad)>
 - dependent code: 0x0cfb000006dd <Other heap object (WEAK_ARRAY_LIST_TYPE)>
 - construction counter: 0

Filled:
DebugPrint: 0xcfb0004ab5d: [JSArray]
 - map: 0x0cfb0018e6b9 <Map[16](PACKED_SMI_ELEMENTS)> [FastProperties]
 - prototype: 0x0cfb0018e92d <JSArray[0]>
 - elements: 0x0cfb0004ab6d <FixedArray[17]> [PACKED_SMI_ELEMENTS]
 - length: 10
 - properties: 0x0cfb000006cd <FixedArray[0]>
 - All own properties (excluding elements): {
    0xcfb00000d41: [String] in ReadOnlySpace: #length: 0x0cfb0028741d <AccessorInfo name= 0x0cfb00000d41 <String[6]: #length>, data= 0x0cfb00000061 <undefined>> (const accessor descriptor), location: descriptor
 }
 - elements: 0x0cfb0004ab6d <FixedArray[17]> {
           0: 0
           1: 1
           2: 2
           3: 3
           4: 4
           5: 5
           6: 6
           7: 7
           8: 8
           9: 9
       10-16: 0x0cfb000006e9 <the_hole_value>
 }
0xcfb0018e6b9: [Map] in OldSpace
 - map: 0x0cfb00183c35 <MetaMap (0x0cfb00183c85 <NativeContext[285]>)>
 - type: JS_ARRAY_TYPE
 - instance size: 16
 - inobject properties: 0
 - unused property fields: 0
 - elements kind: PACKED_SMI_ELEMENTS
 - enum length: invalid
 - back pointer: 0x0cfb00000061 <undefined>
 - prototype_validity cell: 0x0cfb00000a31 <Cell value= 1>
 - instance descriptors #1: 0x0cfb0018ef45 <DescriptorArray[1]>
 - transitions #1: 0x0cfb0018ef61 <TransitionArray[4]>Transition array #1:
     0x0cfb00000e05 <Symbol: (elements_transition_symbol)>: (transition to HOLEY_SMI_ELEMENTS) -> 0x0cfb0018ef79 <Map[16](HOLEY_SMI_ELEMENTS)>

 - prototype: 0x0cfb0018e92d <JSArray[0]>
 - constructor: 0x0cfb0018e625 <JSFunction Array (sfi = 0xcfb0028c6ad)>
 - dependent code: 0x0cfb000006dd <Other heap object (WEAK_ARRAY_LIST_TYPE)>
 - construction counter: 0

Compiler returned: 0

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