Skip to content

Reuse operandType in checkPrefixUnaryExpression #53682

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

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

jakebailey
Copy link
Member

This was caught by jazzer as a timeout.

This code wasn't reusing operandType, so it was duplicating the check. If we nest this, this means that we're doing 2^n checks!

The test case here normally times out (and totally freezes tsserver; don't open it), but now finishes pretty much instantly.

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

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 5, 2023

Heya @jakebailey, I've started to run the perf test suite on this PR at 7fa4ac5. 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 - main..53682
Metric main 53682 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 365,457k (± 0.01%) 365,379k (± 0.01%) -78k (- 0.02%) 365,349k 365,446k p=0.013 n=6
Parse Time 3.38s (± 0.40%) 3.39s (± 0.51%) ~ 3.37s 3.41s p=0.282 n=6
Bind Time 1.12s (± 0.46%) 1.11s (± 1.09%) ~ 1.10s 1.13s p=0.666 n=6
Check Time 8.71s (± 0.58%) 8.68s (± 0.11%) ~ 8.67s 8.69s p=0.288 n=6
Emit Time 7.45s (± 0.44%) 7.43s (± 0.31%) ~ 7.39s 7.45s p=0.280 n=6
Total Time 20.66s (± 0.18%) 20.61s (± 0.13%) -0.05s (- 0.23%) 20.58s 20.64s p=0.036 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 191,764k (± 1.24%) 190,780k (± 0.01%) ~ 190,747k 190,812k p=0.471 n=6
Parse Time 1.49s (± 0.50%) 1.48s (± 1.64%) ~ 1.43s 1.50s p=0.155 n=6
Bind Time 0.77s (± 1.51%) 0.77s (± 0.67%) ~ 0.76s 0.77s p=0.542 n=6
Check Time 9.60s (± 0.44%) 9.61s (± 0.31%) ~ 9.57s 9.66s p=0.747 n=6
Emit Time 2.73s (± 1.04%) 2.73s (± 0.92%) ~ 2.71s 2.77s p=0.808 n=6
Total Time 14.59s (± 0.18%) 14.59s (± 0.21%) ~ 14.56s 14.63s p=1.000 n=6
Monaco - node (v18.10.0, x64)
Memory used 346,403k (± 0.01%) 346,445k (± 0.01%) +43k (+ 0.01%) 346,427k 346,477k p=0.016 n=6
Parse Time 2.57s (± 0.72%) 2.57s (± 0.68%) ~ 2.55s 2.60s p=1.000 n=6
Bind Time 1.01s (± 1.20%) 1.00s (± 0.41%) ~ 1.00s 1.01s p=0.527 n=6
Check Time 7.07s (± 0.35%) 7.10s (± 0.30%) ~ 7.07s 7.13s p=0.059 n=6
Emit Time 4.23s (± 1.00%) 4.23s (± 0.39%) ~ 4.21s 4.25s p=0.808 n=6
Total Time 14.88s (± 0.44%) 14.90s (± 0.22%) ~ 14.86s 14.94s p=0.568 n=6
TFS - node (v18.10.0, x64)
Memory used 300,705k (± 0.01%) 300,697k (± 0.01%) ~ 300,672k 300,715k p=0.378 n=6
Parse Time 2.05s (± 1.11%) 2.05s (± 1.49%) ~ 2.01s 2.09s p=0.871 n=6
Bind Time 1.13s (± 0.72%) 1.14s (± 1.07%) ~ 1.13s 1.16s p=0.120 n=6
Check Time 6.55s (± 0.67%) 6.53s (± 0.37%) ~ 6.51s 6.57s p=0.465 n=6
Emit Time 3.84s (± 0.54%) 3.84s (± 1.36%) ~ 3.79s 3.92s p=0.686 n=6
Total Time 13.58s (± 0.20%) 13.57s (± 0.61%) ~ 13.48s 13.72s p=0.228 n=6
material-ui - node (v18.10.0, x64)
Memory used 480,212k (± 0.02%) 480,149k (± 0.01%) ~ 480,038k 480,242k p=0.296 n=6
Parse Time 3.07s (± 1.03%) 3.05s (± 1.47%) ~ 3.01s 3.13s p=0.470 n=6
Bind Time 0.91s (± 1.33%) 0.91s (± 1.39%) ~ 0.90s 0.93s p=0.737 n=6
Check Time 17.17s (± 0.45%) 17.16s (± 0.25%) ~ 17.13s 17.25s p=1.000 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.15s (± 0.36%) 21.13s (± 0.28%) ~ 21.04s 21.20s p=0.630 n=6
xstate - node (v18.10.0, x64)
Memory used 561,977k (± 0.02%) 562,102k (± 0.02%) ~ 561,959k 562,286k p=0.173 n=6
Parse Time 3.79s (± 0.62%) 3.81s (± 0.65%) ~ 3.78s 3.85s p=0.221 n=6
Bind Time 1.64s (± 0.50%) 1.64s (± 0.31%) ~ 1.64s 1.65s p=0.058 n=6
Check Time 2.83s (± 0.74%) 2.84s (± 1.25%) ~ 2.81s 2.90s p=1.000 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.34s (± 0.37%) 8.38s (± 0.48%) ~ 8.34s 8.44s p=0.091 n=6
Angular - node (v16.17.1, x64)
Memory used 364,802k (± 0.01%) 364,760k (± 0.00%) -43k (- 0.01%) 364,734k 364,783k p=0.006 n=6
Parse Time 3.52s (± 0.43%) 3.52s (± 0.61%) ~ 3.49s 3.55s p=0.934 n=6
Bind Time 1.17s (± 0.71%) 1.18s (± 0.69%) ~ 1.17s 1.19s p=1.000 n=6
Check Time 9.56s (± 0.38%) 9.56s (± 0.49%) ~ 9.51s 9.61s p=1.000 n=6
Emit Time 7.97s (± 0.60%) 7.95s (± 0.72%) ~ 7.88s 8.03s p=0.377 n=6
Total Time 22.23s (± 0.15%) 22.21s (± 0.43%) ~ 22.09s 22.29s p=0.935 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 192,542k (± 0.02%) 193,058k (± 0.66%) ~ 192,465k 195,672k p=1.000 n=6
Parse Time 1.57s (± 1.36%) 1.59s (± 0.86%) ~ 1.56s 1.60s p=0.210 n=6
Bind Time 0.82s (± 0.66%) 0.82s (± 0.92%) ~ 0.81s 0.83s p=0.476 n=6
Check Time 10.34s (± 0.65%) 10.30s (± 0.81%) ~ 10.20s 10.44s p=0.521 n=6
Emit Time 3.01s (± 0.71%) 2.98s (± 0.50%) ~ 2.97s 3.01s p=0.052 n=6
Total Time 15.75s (± 0.44%) 15.70s (± 0.63%) ~ 15.58s 15.85s p=0.378 n=6
Monaco - node (v16.17.1, x64)
Memory used 345,678k (± 0.00%) 345,735k (± 0.00%) +57k (+ 0.02%) 345,713k 345,752k p=0.005 n=6
Parse Time 2.71s (± 0.20%) 2.72s (± 0.44%) +0.02s (+ 0.68%) 2.71s 2.74s p=0.015 n=6
Bind Time 1.08s (± 0.70%) 1.09s (± 1.00%) ~ 1.08s 1.11s p=0.195 n=6
Check Time 7.78s (± 0.68%) 7.79s (± 0.45%) ~ 7.75s 7.83s p=0.469 n=6
Emit Time 4.43s (± 0.84%) 4.47s (± 1.04%) ~ 4.40s 4.52s p=0.199 n=6
Total Time 16.00s (± 0.47%) 16.07s (± 0.35%) ~ 16.00s 16.15s p=0.092 n=6
TFS - node (v16.17.1, x64)
Memory used 300,058k (± 0.00%) 300,056k (± 0.01%) ~ 300,012k 300,089k p=0.936 n=6
Parse Time 2.15s (± 0.24%) 2.16s (± 0.46%) +0.01s (+ 0.54%) 2.15s 2.17s p=0.039 n=6
Bind Time 1.24s (± 0.68%) 1.23s (± 0.73%) ~ 1.22s 1.24s p=0.437 n=6
Check Time 7.22s (± 0.52%) 7.21s (± 0.44%) ~ 7.16s 7.25s p=0.872 n=6
Emit Time 4.33s (± 0.57%) 4.33s (± 0.27%) ~ 4.31s 4.34s p=0.677 n=6
Total Time 14.94s (± 0.27%) 14.92s (± 0.20%) ~ 14.88s 14.96s p=0.573 n=6
material-ui - node (v16.17.1, x64)
Memory used 479,419k (± 0.00%) 479,451k (± 0.02%) ~ 479,374k 479,639k p=1.000 n=6
Parse Time 3.24s (± 0.37%) 3.23s (± 0.55%) ~ 3.19s 3.24s p=0.303 n=6
Bind Time 0.95s (± 0.54%) 0.96s (± 1.61%) ~ 0.95s 0.99s p=0.523 n=6
Check Time 18.21s (± 0.31%) 18.13s (± 0.21%) -0.08s (- 0.45%) 18.09s 18.19s p=0.024 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.40s (± 0.26%) 22.31s (± 0.15%) -0.08s (- 0.37%) 22.27s 22.36s p=0.030 n=6
xstate - node (v16.17.1, x64)
Memory used 559,796k (± 0.03%) 559,688k (± 0.02%) ~ 559,566k 559,853k p=0.297 n=6
Parse Time 3.98s (± 0.26%) 3.97s (± 0.13%) ~ 3.97s 3.98s p=0.548 n=6
Bind Time 1.75s (± 0.70%) 1.74s (± 0.78%) ~ 1.72s 1.76s p=1.000 n=6
Check Time 3.06s (± 0.40%) 3.05s (± 0.21%) -0.01s (- 0.49%) 3.04s 3.06s p=0.027 n=6
Emit Time 0.09s (± 4.45%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=0.405 n=6
Total Time 8.87s (± 0.28%) 8.86s (± 0.20%) ~ 8.83s 8.88s p=0.518 n=6
Angular - node (v14.15.1, x64)
Memory used 358,591k (± 0.01%) 358,595k (± 0.00%) ~ 358,571k 358,610k p=0.748 n=6
Parse Time 3.63s (± 0.73%) 3.64s (± 0.69%) ~ 3.60s 3.67s p=0.415 n=6
Bind Time 1.21s (± 0.43%) 1.22s (± 1.09%) ~ 1.21s 1.24s p=0.774 n=6
Check Time 9.92s (± 0.45%) 9.97s (± 0.44%) ~ 9.91s 10.03s p=0.090 n=6
Emit Time 8.25s (± 0.34%) 8.31s (± 0.57%) +0.06s (+ 0.69%) 8.24s 8.37s p=0.044 n=6
Total Time 23.01s (± 0.25%) 23.14s (± 0.36%) +0.13s (+ 0.57%) 23.02s 23.24s p=0.020 n=6
Compiler-Unions - node (v14.15.1, x64)
Memory used 187,809k (± 0.01%) 187,808k (± 0.02%) ~ 187,748k 187,862k p=1.000 n=6
Parse Time 1.59s (± 0.74%) 1.60s (± 1.08%) ~ 1.58s 1.63s p=0.244 n=6
Bind Time 0.85s (± 0.61%) 0.85s (± 0.48%) ~ 0.84s 0.85s p=0.595 n=6
Check Time 10.45s (± 0.46%) 10.33s (± 0.41%) -0.11s (- 1.08%) 10.27s 10.40s p=0.010 n=6
Emit Time 3.14s (± 0.98%) 3.10s (± 0.64%) ~ 3.07s 3.12s p=0.063 n=6
Total Time 16.02s (± 0.41%) 15.89s (± 0.39%) -0.13s (- 0.80%) 15.79s 15.97s p=0.013 n=6
Monaco - node (v14.15.1, x64)
Memory used 340,666k (± 0.00%) 340,671k (± 0.00%) ~ 340,649k 340,680k p=0.572 n=6
Parse Time 2.82s (± 0.43%) 2.83s (± 0.58%) ~ 2.80s 2.85s p=0.278 n=6
Bind Time 1.09s (± 0.76%) 1.10s (± 0.68%) ~ 1.09s 1.11s p=0.652 n=6
Check Time 8.12s (± 0.60%) 8.13s (± 0.39%) ~ 8.09s 8.18s p=0.747 n=6
Emit Time 4.67s (± 0.36%) 4.68s (± 0.88%) ~ 4.64s 4.74s p=0.933 n=6
Total Time 16.71s (± 0.34%) 16.74s (± 0.39%) ~ 16.69s 16.87s p=0.260 n=6
TFS - node (v14.15.1, x64)
Memory used 295,117k (± 0.00%) 295,138k (± 0.00%) ~ 295,125k 295,157k p=0.066 n=6
Parse Time 2.39s (± 0.86%) 2.39s (± 0.56%) ~ 2.37s 2.41s p=0.803 n=6
Bind Time 1.06s (± 0.39%) 1.07s (± 0.51%) ~ 1.06s 1.07s p=0.054 n=6
Check Time 7.55s (± 0.52%) 7.53s (± 0.39%) ~ 7.48s 7.57s p=0.468 n=6
Emit Time 4.30s (± 0.92%) 4.34s (± 0.43%) +0.04s (+ 0.89%) 4.32s 4.36s p=0.043 n=6
Total Time 15.29s (± 0.47%) 15.32s (± 0.25%) ~ 15.27s 15.39s p=0.327 n=6
material-ui - node (v14.15.1, x64)
Memory used 474,953k (± 0.01%) 474,932k (± 0.01%) ~ 474,879k 474,965k p=0.173 n=6
Parse Time 3.35s (± 0.33%) 3.35s (± 0.44%) ~ 3.34s 3.38s p=1.000 n=6
Bind Time 1.00s (± 0.52%) 0.99s (± 0.55%) ~ 0.99s 1.00s p=0.640 n=6
Check Time 19.19s (± 0.79%) 19.23s (± 0.46%) ~ 19.14s 19.39s p=0.336 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 23.54s (± 0.64%) 23.58s (± 0.38%) ~ 23.48s 23.73s p=0.336 n=6
xstate - node (v14.15.1, x64)
Memory used 548,262k (± 0.01%) 548,290k (± 0.00%) ~ 548,277k 548,302k p=0.066 n=6
Parse Time 4.27s (± 1.66%) 4.35s (± 1.54%) +0.08s (+ 1.91%) 4.26s 4.43s p=0.037 n=6
Bind Time 1.61s (± 4.75%) 1.56s (± 4.79%) ~ 1.51s 1.66s p=0.680 n=6
Check Time 3.18s (± 0.71%) 3.18s (± 0.55%) ~ 3.15s 3.19s p=1.000 n=6
Emit Time 0.09s (± 5.53%) 0.10s (± 5.34%) ~ 0.09s 0.10s p=0.311 n=6
Total Time 9.14s (± 0.35%) 9.18s (± 0.35%) ~ 9.13s 9.21s p=0.088 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.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 53682 6
Baseline main 6

TSServer

Comparison Report - main..53682
Metric main 53682 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,392ms (± 0.16%) 2,398ms (± 0.29%) ~ 2,388ms 2,408ms p=0.127 n=6
Req 2 - geterr 5,717ms (± 0.62%) 5,713ms (± 1.05%) ~ 5,653ms 5,818ms p=0.810 n=6
Req 3 - references 336ms (± 0.85%) 337ms (± 1.14%) ~ 332ms 343ms p=1.000 n=6
Req 4 - navto 282ms (± 1.37%) 282ms (± 1.61%) ~ 277ms 288ms p=0.747 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 85ms (± 2.39%) 83ms (± 2.57%) ~ 79ms 85ms p=0.181 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,543ms (± 1.39%) 2,517ms (± 1.64%) ~ 2,459ms 2,577ms p=0.172 n=6
Req 2 - geterr 4,231ms (± 1.96%) 4,283ms (± 0.78%) ~ 4,235ms 4,323ms p=0.173 n=6
Req 3 - references 344ms (± 0.57%) 343ms (± 0.88%) ~ 339ms 348ms p=0.934 n=6
Req 4 - navto 289ms (± 0.47%) 293ms (± 1.39%) ~ 286ms 298ms p=0.077 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 66ms (± 7.48%) 64ms (± 3.89%) ~ 62ms 69ms p=0.683 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,032ms (± 0.79%) 3,005ms (± 0.67%) -27ms (- 0.89%) 2,977ms 3,038ms p=0.045 n=6
Req 2 - geterr 1,620ms (± 1.11%) 1,608ms (± 1.95%) ~ 1,569ms 1,640ms p=0.689 n=6
Req 3 - references 108ms (± 1.64%) 108ms (± 1.52%) ~ 106ms 110ms p=0.934 n=6
Req 4 - navto 366ms (± 0.70%) 363ms (± 0.53%) -3ms (- 0.82%) 361ms 366ms p=0.050 n=6
Req 5 - completionInfo count 2,862 (± 0.00%) 2,862 (± 0.00%) ~ 2,862 2,862 p=1.000 n=6
Req 5 - completionInfo 374ms (± 2.01%) 373ms (± 1.85%) ~ 360ms 379ms p=0.873 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,511ms (± 0.70%) 2,519ms (± 0.50%) ~ 2,502ms 2,532ms p=0.470 n=6
Req 2 - geterr 6,175ms (± 0.37%) 6,109ms (± 0.38%) -66ms (- 1.07%) 6,075ms 6,140ms p=0.008 n=6
Req 3 - references 348ms (± 0.42%) 346ms (± 1.06%) ~ 342ms 352ms p=0.191 n=6
Req 4 - navto 280ms (± 1.42%) 280ms (± 0.80%) ~ 278ms 284ms p=0.808 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 90ms (± 2.06%) 81ms (± 3.12%) 🟩-9ms (-10.33%) 79ms 86ms p=0.005 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,657ms (± 1.07%) 2,666ms (± 1.06%) ~ 2,636ms 2,696ms p=0.575 n=6
Req 2 - geterr 4,636ms (± 0.41%) 4,643ms (± 0.43%) ~ 4,625ms 4,682ms p=0.521 n=6
Req 3 - references 357ms (± 0.45%) 357ms (± 0.65%) ~ 355ms 361ms p=0.868 n=6
Req 4 - navto 282ms (± 0.73%) 284ms (± 0.61%) ~ 282ms 287ms p=0.088 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 68ms (± 1.31%) 67ms (± 1.13%) ~ 66ms 68ms p=0.053 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,167ms (± 0.44%) 3,171ms (± 0.39%) ~ 3,148ms 3,181ms p=0.809 n=6
Req 2 - geterr 1,780ms (± 1.21%) 1,756ms (± 0.51%) ~ 1,748ms 1,767ms p=0.065 n=6
Req 3 - references 113ms (± 1.07%) 116ms (± 1.18%) +2ms (+ 2.06%) 114ms 118ms p=0.018 n=6
Req 4 - navto 349ms (± 0.46%) 349ms (± 1.92%) ~ 338ms 359ms p=0.870 n=6
Req 5 - completionInfo count 2,862 (± 0.00%) 2,862 (± 0.00%) ~ 2,862 2,862 p=1.000 n=6
Req 5 - completionInfo 388ms (± 1.48%) 389ms (± 1.22%) ~ 381ms 395ms p=1.000 n=6
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,617ms (± 0.38%) 2,605ms (± 0.32%) ~ 2,594ms 2,616ms p=0.092 n=6
Req 2 - geterr 6,425ms (± 2.00%) 6,371ms (± 1.68%) ~ 6,269ms 6,519ms p=0.173 n=6
Req 3 - references 364ms (± 0.30%) 361ms (± 0.59%) -3ms (- 0.78%) 359ms 364ms p=0.027 n=6
Req 4 - navto 280ms (± 0.35%) 284ms (± 0.91%) +4ms (+ 1.25%) 281ms 286ms p=0.015 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 92ms (±11.59%) 93ms (± 9.81%) ~ 85ms 104ms p=0.465 n=6
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 2,820ms (± 0.74%) 2,825ms (± 0.80%) ~ 2,807ms 2,869ms p=0.689 n=6
Req 2 - geterr 4,785ms (± 0.47%) 4,708ms (± 0.44%) -77ms (- 1.61%) 4,689ms 4,746ms p=0.005 n=6
Req 3 - references 368ms (± 0.70%) 378ms (± 0.83%) +11ms (+ 2.86%) 373ms 381ms p=0.005 n=6
Req 4 - navto 293ms (± 0.96%) 291ms (± 0.55%) ~ 288ms 292ms p=0.134 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 90ms (± 8.02%) 79ms (± 4.59%) 🟩-11ms (-12.27%) 74ms 81ms p=0.026 n=6
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen 3,399ms (± 0.45%) 3,410ms (± 0.79%) ~ 3,377ms 3,457ms p=0.468 n=6
Req 2 - geterr 1,888ms (± 0.88%) 1,879ms (± 0.44%) ~ 1,867ms 1,886ms p=0.230 n=6
Req 3 - references 125ms (± 2.19%) 126ms (± 1.59%) ~ 123ms 129ms p=0.221 n=6
Req 4 - navto 376ms (± 1.31%) 376ms (± 0.81%) ~ 371ms 379ms p=1.000 n=6
Req 5 - completionInfo count 2,862 (± 0.00%) 2,862 (± 0.00%) ~ 2,862 2,862 p=1.000 n=6
Req 5 - completionInfo 410ms (± 2.00%) 413ms (± 2.07%) ~ 405ms 425ms p=0.629 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.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 53682 6
Baseline main 6

Startup

Comparison Report - main..53682
Metric main 53682 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 141.38ms (± 0.18%) 142.05ms (± 0.20%) +0.67ms (+ 0.47%) 141.36ms 147.10ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 219.25ms (± 0.15%) 220.21ms (± 0.15%) +0.96ms (+ 0.44%) 219.26ms 225.26ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 220.78ms (± 0.17%) 221.46ms (± 0.17%) +0.68ms (+ 0.31%) 220.51ms 226.75ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 203.17ms (± 0.18%) 203.79ms (± 0.20%) +0.62ms (+ 0.30%) 202.90ms 212.69ms p=0.000 n=600
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-135-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
Benchmark Name Iterations
Current 53682 6
Baseline main 6

Developer Information:

Download Benchmark

@jakebailey
Copy link
Member Author

Seems like no change. Let's test the rest.

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 6, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 6, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 6, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 6, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 6, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 6, 2023

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

@typescript-bot
Copy link
Collaborator

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

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Package install failed"

Otherwise...

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user test suite comparing main and refs/pull/53682/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/53682/merge:

Everything looks good!

@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 top-repos suite comparing main and refs/pull/53682/merge:

Everything looks good!

==== tests/cases/compiler/nestedUnaryExpressionHang.ts (2 errors) ====
3333%!!!!!!!!!!!!!!!!!!!!!!!!!!!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
Copy link
Member Author

Choose a reason for hiding this comment

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

This code doesn't parse properly, but, that's the test case that the fuzzer gave me so I feel like it's fine? But, I can try and come up with something that exhibits this problem without errors if desired.

@@ -36120,7 +36120,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
return getUnaryResultType(operandType);
case SyntaxKind.ExclamationToken:
checkTruthinessExpression(node.operand);
checkTruthinessOfType(operandType, node.operand);
Copy link
Member Author

@jakebailey jakebailey Apr 6, 2023

Choose a reason for hiding this comment

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

This direct call to checkTruthinessOfType when the operand type is known mirrors our handling of binary expressions in onOperator.

I checked all other call sites, and only this one benefits from not reevaluating the type (which is good, unless we wanted to find more of these for even more perf!).

@jakebailey jakebailey merged commit 7f63767 into microsoft:main Apr 6, 2023
@jakebailey jakebailey deleted the nested-unary-expression-hang branch April 6, 2023 20:40
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