Skip to content

Conversation

@Andarist
Copy link
Contributor

fixes #55562

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Aug 31, 2023
@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

@sandersn sandersn self-assigned this Sep 12, 2023
@andrewbranch
Copy link
Member

@typescript-bot perf test this
@typescript-bot test top100

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 12, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 12, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@andrewbranch
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,266k (± 0.00%) 300,291k (± 0.01%) +25k (+ 0.01%) 300,270k 300,305k p=0.013 n=6
Parse Time 3.01s (± 0.25%) 3.01s (± 0.14%) ~ 3.01s 3.02s p=0.389 n=6
Bind Time 0.93s (± 0.00%) 0.93s (± 0.00%) ~ 0.93s 0.93s p=1.000 n=6
Check Time 9.33s (± 0.16%) 9.34s (± 0.37%) ~ 9.30s 9.39s p=0.746 n=6
Emit Time 7.62s (± 0.30%) 7.64s (± 0.42%) ~ 7.58s 7.67s p=0.126 n=6
Total Time 20.90s (± 0.11%) 20.92s (± 0.15%) ~ 20.89s 20.98s p=0.124 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,951k (± 0.02%) 194,494k (± 0.66%) ~ 193,879k 197,125k p=0.128 n=6
Parse Time 1.58s (± 0.26%) 1.58s (± 0.26%) ~ 1.58s 1.59s p=1.000 n=6
Bind Time 0.80s (± 0.51%) 0.80s (± 0.69%) ~ 0.79s 0.80s p=0.282 n=6
Check Time 9.96s (± 0.23%) 9.92s (± 0.44%) ~ 9.86s 9.98s p=0.195 n=6
Emit Time 2.75s (± 0.50%) 2.74s (± 0.50%) ~ 2.72s 2.76s p=0.217 n=6
Total Time 15.09s (± 0.09%) 15.04s (± 0.39%) ~ 14.96s 15.11s p=0.227 n=6
Monaco - node (v16.17.1, x64)
Memory used 347,207k (± 0.00%) 347,181k (± 0.01%) ~ 347,106k 347,217k p=0.873 n=6
Parse Time 2.69s (± 0.28%) 2.69s (± 0.15%) ~ 2.68s 2.69s p=1.000 n=6
Bind Time 0.99s (± 0.00%) 0.99s (± 0.00%) ~ 0.99s 0.99s p=1.000 n=6
Check Time 7.94s (± 0.22%) 7.95s (± 0.31%) ~ 7.92s 7.99s p=0.746 n=6
Emit Time 4.27s (± 0.30%) 4.27s (± 0.37%) ~ 4.26s 4.30s p=1.000 n=6
Total Time 15.89s (± 0.19%) 15.90s (± 0.25%) ~ 15.85s 15.94s p=1.000 n=6
TFS - node (v16.17.1, x64)
Memory used 301,188k (± 0.00%) 301,169k (± 0.01%) ~ 301,147k 301,183k p=0.109 n=6
Parse Time 2.17s (± 0.45%) 2.18s (± 0.19%) +0.01s (+ 0.61%) 2.18s 2.19s p=0.024 n=6
Bind Time 1.11s (± 0.68%) 1.11s (± 0.37%) ~ 1.11s 1.12s p=1.000 n=6
Check Time 7.21s (± 0.47%) 7.25s (± 0.26%) ~ 7.23s 7.27s p=0.139 n=6
Emit Time 3.98s (± 0.29%) 3.97s (± 0.32%) ~ 3.95s 3.98s p=0.210 n=6
Total Time 14.47s (± 0.29%) 14.51s (± 0.14%) ~ 14.49s 14.54s p=0.157 n=6
material-ui - node (v16.17.1, x64)
Memory used 479,537k (± 0.00%) 479,553k (± 0.00%) ~ 479,524k 479,583k p=0.378 n=6
Parse Time 3.15s (± 0.13%) 3.15s (± 0.48%) ~ 3.14s 3.18s p=0.490 n=6
Bind Time 0.91s (± 0.00%) 0.91s (± 0.45%) ~ 0.90s 0.91s p=0.405 n=6
Check Time 17.85s (± 0.24%) 17.85s (± 0.29%) ~ 17.79s 17.93s 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.91s (± 0.21%) 21.92s (± 0.27%) ~ 21.85s 21.99s p=0.871 n=6
xstate - node (v16.17.1, x64)
Memory used 542,853k (± 0.02%) 542,844k (± 0.01%) ~ 542,796k 542,881k p=0.689 n=6
Parse Time 3.69s (± 0.17%) 3.69s (± 0.32%) ~ 3.67s 3.70s p=1.000 n=6
Bind Time 1.40s (± 4.59%) 1.42s (± 4.16%) ~ 1.34s 1.47s p=0.678 n=6
Check Time 3.24s (± 2.45%) 3.22s (± 2.35%) ~ 3.15s 3.32s p=0.935 n=6
Emit Time 0.09s (± 6.44%) 0.09s (± 4.62%) ~ 0.08s 0.09s p=0.282 n=6
Total Time 8.41s (± 0.24%) 8.42s (± 0.37%) ~ 8.37s 8.45s p=0.627 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,487ms (± 0.13%) 2,490ms (± 0.23%) ~ 2,482ms 2,498ms p=0.378 n=6
Req 2 - geterr 5,950ms (± 0.48%) 5,959ms (± 0.42%) ~ 5,929ms 5,986ms p=0.470 n=6
Req 3 - references 342ms (± 0.15%) 342ms (± 0.66%) ~ 338ms 344ms p=0.113 n=6
Req 4 - navto 277ms (± 0.95%) 277ms (± 0.99%) ~ 274ms 280ms p=0.682 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 81ms (± 5.69%) 85ms (± 5.74%) ~ 80ms 93ms p=0.332 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,624ms (± 0.46%) 2,632ms (± 1.21%) ~ 2,605ms 2,685ms p=0.809 n=6
Req 2 - geterr 4,772ms (± 0.26%) 4,772ms (± 0.35%) ~ 4,747ms 4,796ms p=1.000 n=6
Req 3 - references 351ms (± 0.35%) 350ms (± 0.33%) ~ 349ms 352ms p=0.507 n=6
Req 4 - navto 269ms (± 0.38%) 269ms (± 0.19%) ~ 268ms 269ms p=0.928 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.39%) 79ms (± 0.95%) ~ 78ms 80ms p=0.604 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,706ms (± 0.20%) 2,704ms (± 0.14%) ~ 2,699ms 2,710ms p=0.629 n=6
Req 2 - geterr 1,930ms (± 2.41%) 1,974ms (± 0.67%) +44ms (+ 2.25%) 1,950ms 1,986ms p=0.045 n=6
Req 3 - references 133ms (± 7.69%) 139ms (± 1.73%) ~ 136ms 142ms p=0.167 n=6
Req 4 - navto 358ms (± 1.11%) 360ms (± 0.71%) ~ 358ms 365ms p=0.290 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 317ms (± 1.62%) 325ms (± 1.43%) +9ms (+ 2.69%) 316ms 328ms p=0.022 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 156.74ms (± 0.21%) 156.86ms (± 0.19%) +0.11ms (+ 0.07%) 155.03ms 159.92ms p=0.006 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 230.77ms (± 0.12%) 231.57ms (± 0.14%) +0.80ms (+ 0.34%) 230.07ms 238.29ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 235.49ms (± 0.12%) 235.98ms (± 0.12%) +0.50ms (+ 0.21%) 234.74ms 239.72ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 235.67ms (± 0.11%) 235.59ms (± 0.12%) -0.08ms (- 0.04%) 234.30ms 238.57ms 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

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

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

Works for me. @DanielRosenwasser any objection to the API addition? I kind of like it.

@sandersn
Copy link
Member

@Andarist this looks like it's ready to go except for checking on test results. Do you want to finish this up? Otherwise I'll probably close it for housekeeping purposes.

@jakebailey
Copy link
Member

I think we just forgot about this. In microsoft/typescript-go#2067, I revamped the unreachable code detection in a way that effectively does what this PR did. I'm glad we were planning on merging this because I was having a hell of a time rationalizing the old behavior.

@github-project-automation github-project-automation bot moved this from Waiting on author to Done in PR Backlog Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Only first unreachable statement flagged in 'case'

6 participants