Skip to content

Move all js emit alias marking behavior behind a single entrypoint - #58366

Merged
Wesley Wigham (weswigham) merged 15 commits into
microsoft:mainfrom
weswigham:alias-marking-for-js-emit-refactor
May 10, 2024
Merged

Move all js emit alias marking behavior behind a single entrypoint#58366
Wesley Wigham (weswigham) merged 15 commits into
microsoft:mainfrom
weswigham:alias-marking-for-js-emit-refactor

Conversation

@weswigham

Copy link
Copy Markdown
Member

This is one of the two bigger checker refactors in #58364 - by validating its' perf separately, I can narrow down the perf regression there (and possibly simplify merging it by getting this merged separately).

@weswigham

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this faster

@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 29, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Wesley Wigham (@weswigham)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,155+1 (+ 0.00%)~~p=0.001 n=6
Types50,27350,278+5 (+ 0.01%)~~p=0.001 n=6
Memory used194,585k (± 0.91%)192,285k (± 0.01%)~192,240k192,311kp=0.066 n=6
Parse Time1.57s (± 1.48%)1.57s (± 1.17%)~1.54s1.59sp=1.000 n=6
Bind Time0.87s (± 0.60%)0.87s (± 0.94%)~0.86s0.88sp=0.929 n=6
Check Time11.27s (± 0.27%)12.08s (± 0.58%)🔻+0.81s (+ 7.20%)12.00s12.19sp=0.005 n=6
Emit Time3.14s (± 0.75%)3.14s (± 0.71%)~3.12s3.17sp=0.871 n=6
Total Time16.84s (± 0.23%)17.66s (± 0.42%)🔻+0.82s (+ 4.87%)17.56s17.77sp=0.005 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols945,322945,616+294 (+ 0.03%)~~p=0.001 n=6
Types408,088408,181+93 (+ 0.02%)~~p=0.001 n=6
Memory used1,222,115k (± 0.00%)1,222,015k (± 0.01%)-100k (- 0.01%)1,221,945k1,222,138kp=0.045 n=6
Parse Time8.06s (± 0.59%)8.05s (± 0.49%)~7.99s8.10sp=0.808 n=6
Bind Time2.22s (± 0.84%)2.23s (± 0.62%)~2.21s2.24sp=0.933 n=6
Check Time36.47s (± 0.48%)38.98s (± 0.45%)🔻+2.51s (+ 6.88%)38.79s39.20sp=0.005 n=6
Emit Time17.44s (± 0.66%)17.44s (± 0.77%)~17.33s17.70sp=0.630 n=6
Total Time64.19s (± 0.41%)66.69s (± 0.37%)+2.51s (+ 3.91%)66.46s67.10sp=0.005 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,955,9521,956,117+165 (+ 0.01%)~~p=0.001 n=6
Types676,324676,343+19 (+ 0.00%)~~p=0.001 n=6
Memory used1,754,551k (± 0.00%)1,754,731k (± 0.00%)+180k (+ 0.01%)1,754,680k1,754,849kp=0.005 n=6
Parse Time7.95s (± 0.40%)7.99s (± 0.44%)~7.94s8.03sp=0.071 n=6
Bind Time2.73s (± 0.55%)2.72s (± 0.49%)~2.70s2.74sp=0.241 n=6
Check Time67.13s (± 0.26%)68.32s (± 0.44%)+1.19s (+ 1.78%)67.92s68.75sp=0.005 n=6
Emit Time0.16s (± 2.52%)0.16s (± 7.22%)~0.15s0.18sp=0.858 n=6
Total Time77.98s (± 0.21%)79.19s (± 0.38%)+1.21s (+ 1.56%)78.78s79.57sp=0.005 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,215,7101,216,199+489 (+ 0.04%)~~p=0.001 n=6
Types257,646257,832+186 (+ 0.07%)~~p=0.001 n=6
Memory used2,324,280k (± 0.02%)2,325,532k (± 0.01%)+1,252k (+ 0.05%)2,325,273k2,325,725kp=0.005 n=6
Parse Time4.96s (± 1.19%)4.94s (± 0.98%)~4.88s5.01sp=0.471 n=6
Bind Time1.86s (± 0.74%)1.88s (± 0.55%)~1.86s1.89sp=0.134 n=6
Check Time33.96s (± 0.39%)36.36s (± 0.45%)🔻+2.40s (+ 7.06%)36.20s36.67sp=0.005 n=6
Emit Time2.62s (± 0.90%)2.62s (± 0.96%)~2.58s2.65sp=1.000 n=6
Total Time43.40s (± 0.36%)45.81s (± 0.44%)🔻+2.41s (+ 5.55%)45.54s46.13sp=0.005 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,215,7101,216,199+489 (+ 0.04%)~~p=0.001 n=6
Types257,646257,832+186 (+ 0.07%)~~p=0.001 n=6
Memory used2,398,762k (± 0.02%)2,400,851k (± 0.02%)+2,088k (+ 0.09%)2,400,186k2,401,378kp=0.005 n=6
Parse Time6.21s (± 1.26%)6.22s (± 0.93%)~6.14s6.32sp=0.748 n=6
Bind Time2.02s (± 1.27%)1.99s (± 0.63%)-0.03s (- 1.57%)1.98s2.01sp=0.029 n=6
Check Time40.62s (± 0.39%)43.14s (± 0.64%)🔻+2.53s (+ 6.22%)42.89s43.65sp=0.005 n=6
Emit Time3.17s (± 3.02%)3.15s (± 4.20%)~3.03s3.40sp=0.521 n=6
Total Time52.03s (± 0.28%)54.53s (± 0.53%)🔻+2.50s (+ 4.81%)54.27s55.00sp=0.005 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,206256,426+220 (+ 0.09%)~~p=0.001 n=6
Types103,653103,710+57 (+ 0.05%)~~p=0.001 n=6
Memory used424,261k (± 0.01%)424,558k (± 0.01%)+297k (+ 0.07%)424,480k424,615kp=0.005 n=6
Parse Time4.14s (± 0.79%)4.16s (± 0.36%)~4.14s4.18sp=0.462 n=6
Bind Time1.58s (± 1.17%)1.58s (± 0.93%)~1.56s1.60sp=0.514 n=6
Check Time22.59s (± 0.27%)23.91s (± 0.33%)🔻+1.32s (+ 5.83%)23.82s24.05sp=0.005 n=6
Emit Time1.72s (± 1.25%)1.75s (± 1.52%)~1.73s1.79sp=0.120 n=6
Total Time30.04s (± 0.33%)31.39s (± 0.25%)🔻+1.35s (+ 4.49%)31.30s31.53sp=0.005 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,824224,980+156 (+ 0.07%)~~p=0.001 n=6
Types93,39093,429+39 (+ 0.04%)~~p=0.001 n=6
Memory used369,309k (± 0.01%)369,484k (± 0.02%)+175k (+ 0.05%)369,416k369,566kp=0.005 n=6
Parse Time3.53s (± 1.06%)3.49s (± 0.40%)-0.04s (- 1.18%)3.47s3.51sp=0.024 n=6
Bind Time1.95s (± 0.94%)1.94s (± 1.40%)~1.89s1.97sp=0.462 n=6
Check Time19.45s (± 0.32%)20.58s (± 0.37%)🔻+1.13s (+ 5.81%)20.48s20.66sp=0.005 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.94s (± 0.28%)26.01s (± 0.27%)🔻+1.08s (+ 4.32%)25.92s26.10sp=0.005 n=6
vscode - node (v18.15.0, x64)
Errors44~~~p=1.000 n=6
Symbols2,799,0282,801,724+2,696 (+ 0.10%)~~p=0.001 n=6
Types950,805951,537+732 (+ 0.08%)~~p=0.001 n=6
Memory used2,926,648k (± 0.00%)2,926,905k (± 0.00%)+257k (+ 0.01%)2,926,810k2,927,105kp=0.005 n=6
Parse Time16.48s (± 0.26%)16.47s (± 0.18%)~16.44s16.51sp=1.000 n=6
Bind Time5.02s (± 1.66%)5.03s (± 1.91%)~4.96s5.22sp=0.936 n=6
Check Time88.52s (± 0.46%)104.17s (± 0.72%)🔻+15.65s (+17.67%)103.22s105.02sp=0.005 n=6
Emit Time26.13s (± 9.51%)26.06s (± 8.28%)~23.64s28.99sp=0.689 n=6
Total Time136.15s (± 1.90%)151.74s (± 1.56%)🔻+15.58s (+11.44%)149.19s155.46sp=0.005 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols265,858265,884+26 (+ 0.01%)~~p=0.001 n=6
Types108,442108,445+3 (+ 0.00%)~~p=0.001 n=6
Memory used410,387k (± 0.02%)410,376k (± 0.03%)~410,209k410,550kp=0.873 n=6
Parse Time4.77s (± 0.64%)4.76s (± 0.97%)~4.70s4.82sp=1.000 n=6
Bind Time2.07s (± 1.31%)2.06s (± 1.05%)~2.03s2.09sp=0.806 n=6
Check Time21.06s (± 0.37%)22.02s (± 0.27%)🔻+0.96s (+ 4.58%)21.94s22.09sp=0.005 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.89s (± 0.23%)28.85s (± 0.19%)+0.96s (+ 3.43%)28.79s28.92sp=0.005 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols524,146524,176+30 (+ 0.01%)~~p=0.001 n=6
Types178,732178,732~~~p=1.000 n=6
Memory used461,402k (± 0.03%)461,453k (± 0.02%)~461,376k461,587kp=0.173 n=6
Parse Time2.61s (± 0.67%)2.62s (± 0.34%)~2.61s2.63sp=0.367 n=6
Bind Time0.99s (± 0.84%)0.99s (± 0.76%)~0.98s1.00sp=0.652 n=6
Check Time15.35s (± 0.51%)15.56s (± 0.66%)+0.22s (+ 1.40%)15.40s15.71sp=0.008 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time18.96s (± 0.32%)19.18s (± 0.56%)+0.22s (+ 1.16%)19.00s19.32sp=0.008 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@weswigham

Copy link
Copy Markdown
MemberAuthor

Oof, okay, much to my surprise, it's this half that's most problematic as-is. I'm going to guess the closure allocations on each call (which are just to organize and prevent calling the inner functions) are no good. Let's remove those...

@weswigham
Wesley Wigham (weswigham)force-pushed the alias-marking-for-js-emit-refactor branch from c4d3047 to 003d816CompareApril 30, 2024 01:32
@weswigham

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this faster

@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 30, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Wesley Wigham (@weswigham)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,155+1 (+ 0.00%)~~p=0.001 n=6
Types50,27350,278+5 (+ 0.01%)~~p=0.001 n=6
Memory used192,275k (± 0.08%)194,666k (± 0.94%)+2,391k (+ 1.24%)192,287k195,889kp=0.030 n=6
Parse Time1.27s (± 2.14%)1.30s (± 1.16%)~1.28s1.32sp=0.166 n=6
Bind Time0.72s0.72s~~~p=1.000 n=6
Check Time9.58s (± 0.38%)10.19s (± 0.44%)🔻+0.61s (+ 6.40%)10.13s10.24sp=0.005 n=6
Emit Time2.61s (± 0.53%)2.62s (± 0.57%)~2.60s2.64sp=0.315 n=6
Total Time14.19s (± 0.42%)14.83s (± 0.40%)🔻+0.64s (+ 4.52%)14.74s14.89sp=0.005 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols945,322945,616+294 (+ 0.03%)~~p=0.001 n=6
Types408,088408,181+93 (+ 0.02%)~~p=0.001 n=6
Memory used1,222,148k (± 0.00%)1,222,104k (± 0.01%)~1,221,992k1,222,194kp=0.471 n=6
Parse Time6.79s (± 0.38%)6.77s (± 0.41%)~6.74s6.82sp=0.567 n=6
Bind Time1.87s (± 0.44%)1.87s (± 0.80%)~1.85s1.89sp=0.797 n=6
Check Time31.35s (± 0.29%)33.34s (± 0.13%)🔻+1.99s (+ 6.35%)33.27s33.40sp=0.005 n=6
Emit Time14.64s (± 1.06%)14.64s (± 0.44%)~14.59s14.76sp=0.575 n=6
Total Time54.65s (± 0.32%)56.62s (± 0.12%)+1.98s (+ 3.61%)56.50s56.71sp=0.005 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,955,9521,956,117+165 (+ 0.01%)~~p=0.001 n=6
Types676,324676,343+19 (+ 0.00%)~~p=0.001 n=6
Memory used1,754,629k (± 0.00%)1,754,796k (± 0.00%)+166k (+ 0.01%)1,754,747k1,754,853kp=0.005 n=6
Parse Time6.73s (± 0.36%)6.73s (± 0.37%)~6.70s6.77sp=0.935 n=6
Bind Time2.29s (± 0.18%)2.30s (± 0.43%)~2.29s2.31sp=0.071 n=6
Check Time56.78s (± 0.39%)57.48s (± 0.16%)+0.71s (+ 1.24%)57.34s57.61sp=0.005 n=6
Emit Time0.13s (± 3.87%)0.14s (± 3.77%)~0.13s0.14sp=0.311 n=6
Total Time65.93s (± 0.35%)66.66s (± 0.15%)+0.72s (+ 1.10%)66.51s66.79sp=0.005 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,215,7311,216,221+490 (+ 0.04%)~~p=0.001 n=6
Types257,647257,833+186 (+ 0.07%)~~p=0.001 n=6
Memory used2,324,573k (± 0.02%)2,325,528k (± 0.02%)+955k (+ 0.04%)2,325,013k2,326,077kp=0.020 n=6
Parse Time4.98s (± 1.05%)4.95s (± 0.79%)~4.93s5.03sp=0.378 n=6
Bind Time1.86s (± 0.44%)1.88s (± 1.39%)~1.84s1.91sp=0.223 n=6
Check Time33.97s (± 0.36%)36.14s (± 0.41%)🔻+2.17s (+ 6.40%)35.91s36.30sp=0.005 n=6
Emit Time2.59s (± 2.78%)2.64s (± 0.50%)~2.62s2.66sp=0.335 n=6
Total Time43.42s (± 0.39%)45.63s (± 0.38%)🔻+2.21s (+ 5.09%)45.33s45.79sp=0.005 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,215,7311,216,221+490 (+ 0.04%)~~p=0.001 n=6
Types257,647257,833+186 (+ 0.07%)~~p=0.001 n=6
Memory used2,398,795k (± 0.02%)2,401,323k (± 0.03%)+2,527k (+ 0.11%)2,400,248k2,401,985kp=0.005 n=6
Parse Time6.21s (± 1.14%)6.21s (± 0.93%)~6.14s6.28sp=1.000 n=6
Bind Time2.02s (± 1.46%)2.01s (± 1.20%)~1.99s2.05sp=0.421 n=6
Check Time40.57s (± 0.32%)43.07s (± 0.47%)🔻+2.50s (+ 6.16%)42.85s43.33sp=0.005 n=6
Emit Time3.12s (± 1.22%)3.19s (± 1.26%)+0.07s (+ 2.19%)3.16s3.27sp=0.005 n=6
Total Time51.94s (± 0.12%)54.49s (± 0.43%)🔻+2.55s (+ 4.92%)54.21s54.74sp=0.005 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,206256,427+221 (+ 0.09%)~~p=0.001 n=6
Types103,653103,710+57 (+ 0.05%)~~p=0.001 n=6
Memory used424,276k (± 0.02%)424,595k (± 0.01%)+320k (+ 0.08%)424,569k424,660kp=0.005 n=6
Parse Time3.35s (± 1.00%)3.35s (± 0.76%)~3.33s3.39sp=0.870 n=6
Bind Time1.30s (± 1.02%)1.30s (± 0.84%)~1.28s1.31sp=0.931 n=6
Check Time18.23s (± 0.32%)19.41s (± 0.40%)🔻+1.17s (+ 6.44%)19.31s19.51sp=0.005 n=6
Emit Time1.36s (± 1.38%)1.37s (± 2.00%)~1.33s1.40sp=0.570 n=6
Total Time24.23s (± 0.34%)25.42s (± 0.18%)🔻+1.19s (+ 4.91%)25.37s25.48sp=0.005 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,824224,980+156 (+ 0.07%)~~p=0.001 n=6
Types93,39093,429+39 (+ 0.04%)~~p=0.001 n=6
Memory used369,281k (± 0.02%)369,540k (± 0.02%)+258k (+ 0.07%)369,464k369,610kp=0.005 n=6
Parse Time3.53s (± 1.00%)3.50s (± 0.72%)-0.03s (- 0.94%)3.46s3.52sp=0.043 n=6
Bind Time1.93s (± 0.91%)1.94s (± 1.29%)~1.89s1.96sp=0.681 n=6
Check Time19.43s (± 0.43%)20.58s (± 0.11%)🔻+1.15s (+ 5.92%)20.54s20.60sp=0.005 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.90s (± 0.40%)26.02s (± 0.17%)🔻+1.12s (+ 4.49%)25.95s26.07sp=0.005 n=6
vscode - node (v18.15.0, x64)
Errors44~~~p=1.000 n=6
Symbols2,799,5352,802,230+2,695 (+ 0.10%)~~p=0.001 n=6
Types950,956951,688+732 (+ 0.08%)~~p=0.001 n=6
Memory used2,927,024k (± 0.01%)2,927,435k (± 0.01%)+411k (+ 0.01%)2,926,906k2,927,620kp=0.045 n=6
Parse Time13.34s (± 0.24%)13.33s (± 0.33%)~13.27s13.40sp=0.627 n=6
Bind Time4.08s (± 0.33%)4.12s (± 2.10%)~4.08s4.30sp=0.284 n=6
Check Time72.94s (± 0.39%)85.55s (± 0.58%)🔻+12.61s (+17.29%)85.23s86.46sp=0.005 n=6
Emit Time21.26s (± 9.20%)21.01s (± 8.88%)~19.34s23.67sp=0.810 n=6
Total Time111.63s (± 1.71%)124.02s (± 1.82%)🔻+12.39s (+11.10%)122.01s127.50sp=0.005 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols265,858265,884+26 (+ 0.01%)~~p=0.001 n=6
Types108,442108,445+3 (+ 0.00%)~~p=0.001 n=6
Memory used410,462k (± 0.02%)410,442k (± 0.02%)~410,300k410,570kp=0.810 n=6
Parse Time4.76s (± 0.57%)4.73s (± 0.83%)~4.68s4.78sp=0.368 n=6
Bind Time2.06s (± 0.91%)2.05s (± 0.89%)~2.02s2.07sp=0.625 n=6
Check Time21.10s (± 0.39%)21.97s (± 0.48%)🔻+0.87s (+ 4.14%)21.88s22.16sp=0.005 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.92s (± 0.22%)28.75s (± 0.50%)+0.83s (+ 2.99%)28.58s28.98sp=0.005 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols524,146524,176+30 (+ 0.01%)~~p=0.001 n=6
Types178,732178,732~~~p=1.000 n=6
Memory used461,316k (± 0.02%)461,395k (± 0.02%)~461,309k461,525kp=0.199 n=6
Parse Time3.13s (± 1.47%)3.13s (± 0.94%)~3.09s3.17sp=1.000 n=6
Bind Time1.19s (± 0.34%)1.18s (± 1.03%)~1.17s1.20sp=0.849 n=6
Check Time18.25s (± 0.52%)18.39s (± 0.74%)~18.22s18.61sp=0.092 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time22.57s (± 0.48%)22.71s (± 0.50%)~22.58s22.89sp=0.054 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@weswigham

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this faster

@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 30, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test this faster✅ Started👀 Results

module A.B.C {
import XYZ = X.Y.Z;
~
!!! error TS2339: Property 'Y' does not exist on type 'typeof X'.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

We drop this (duplicate-ish) error because now, rather than relying on checkExpressionCached to paint the reference recursively for the import = statement, we directly use markIdentifierAliasReferenced on the leftmost identifier in the entity name. Which should be faster, and, as this test shows, shouldn't cause us to drop any real errors, since any missing members get reported when we actually resolve the name (with a more sensible error, even).

Comment threadsrc/compiler/checker.ts Outdated
) {
markAliasReferenced(parentSymbol, node);
}
markLinkedReferences(node, prop, leftType);

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I'm hoping reusing the leftType+prop here negates the performance impact this change had. Non-checker uses aren't expected to have done this work already, so it does still need to have the logic to lookup the prop itself, and is probably the costly part of alias marking. That you can't just say A.B; references A because A.B might be a const enum reference that gets inlined (and so you need to typecheck) is actually quite annoying from an encapsulation point of view - it's the one place in this process where we have to resort to typechecking. I guess that's why it's not done in isolatedModules. 😄

@typescript-bot

Copy link
Copy Markdown
Contributor

Wesley Wigham (@weswigham)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,154~~~p=1.000 n=6
Types50,27350,273~~~p=1.000 n=6
Memory used192,215k (± 0.08%)193,502k (± 1.00%)+1,288k (+ 0.67%)192,216k196,051kp=0.031 n=6
Parse Time1.57s (± 1.44%)1.59s (± 0.84%)~1.57s1.61sp=0.096 n=6
Bind Time0.87s (± 1.41%)0.87s (± 0.87%)~0.86s0.88sp=0.555 n=6
Check Time11.29s (± 0.44%)11.48s (± 0.55%)+0.19s (+ 1.68%)11.37s11.53sp=0.005 n=6
Emit Time3.14s (± 0.26%)3.14s (± 0.16%)~3.14s3.15sp=0.929 n=6
Total Time16.86s (± 0.31%)17.08s (± 0.31%)+0.22s (+ 1.29%)16.99s17.13sp=0.005 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols945,322945,322~~~p=1.000 n=6
Types408,088408,087-1 (- 0.00%)~~p=0.001 n=6
Memory used1,222,143k (± 0.01%)1,222,197k (± 0.00%)~1,222,160k1,222,244kp=0.173 n=6
Parse Time6.77s (± 0.49%)6.80s (± 0.48%)~6.74s6.84sp=0.123 n=6
Bind Time1.87s (± 0.22%)1.88s (± 0.27%)~1.87s1.88sp=0.112 n=6
Check Time31.36s (± 0.45%)32.05s (± 0.64%)+0.69s (+ 2.19%)31.85s32.39sp=0.005 n=6
Emit Time14.74s (± 0.50%)14.67s (± 0.65%)~14.55s14.79sp=0.295 n=6
Total Time54.74s (± 0.29%)55.40s (± 0.26%)+0.65s (+ 1.19%)55.28s55.66sp=0.005 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,955,9561,955,983+27 (+ 0.00%)~~p=0.001 n=6
Types676,324676,333+9 (+ 0.00%)~~p=0.001 n=6
Memory used1,754,543k (± 0.00%)1,754,610k (± 0.00%)+67k (+ 0.00%)1,754,566k1,754,650kp=0.008 n=6
Parse Time6.73s (± 0.45%)6.72s (± 0.77%)~6.65s6.78sp=0.808 n=6
Bind Time2.30s (± 0.18%)2.30s (± 0.43%)~2.29s2.32sp=0.673 n=6
Check Time56.80s (± 0.53%)57.18s (± 0.44%)+0.38s (+ 0.68%)56.83s57.56sp=0.045 n=6
Emit Time0.14s (± 4.51%)0.14s (± 4.51%)~0.13s0.15sp=1.000 n=6
Total Time65.97s (± 0.47%)66.34s (± 0.45%)~65.94s66.76sp=0.093 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,215,7311,215,755+24 (+ 0.00%)~~p=0.001 n=6
Types257,647257,647~~~p=1.000 n=6
Memory used2,324,113k (± 0.01%)2,325,817k (± 0.02%)+1,703k (+ 0.07%)2,325,367k2,326,866kp=0.005 n=6
Parse Time4.96s (± 0.84%)4.95s (± 1.02%)~4.87s5.02sp=0.873 n=6
Bind Time1.87s (± 0.59%)1.88s (± 0.75%)~1.86s1.90sp=0.245 n=6
Check Time33.89s (± 0.44%)34.48s (± 0.17%)+0.59s (+ 1.73%)34.41s34.55sp=0.005 n=6
Emit Time2.58s (± 1.34%)2.58s (± 2.06%)~2.48s2.64sp=1.000 n=6
Total Time43.32s (± 0.34%)43.90s (± 0.15%)+0.58s (+ 1.33%)43.83s44.01sp=0.005 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,215,7311,215,755+24 (+ 0.00%)~~p=0.001 n=6
Types257,647257,647~~~p=1.000 n=6
Memory used2,398,771k (± 0.03%)2,400,026k (± 0.03%)+1,255k (+ 0.05%)2,399,376k2,401,609kp=0.031 n=6
Parse Time5.13s (± 0.68%)5.17s (± 0.77%)~5.10s5.22sp=0.092 n=6
Bind Time1.68s (± 0.88%)1.68s (± 1.11%)~1.66s1.70sp=0.804 n=6
Check Time34.45s (± 0.24%)35.07s (± 0.23%)+0.62s (+ 1.81%)34.95s35.15sp=0.005 n=6
Emit Time2.62s (± 1.38%)2.62s (± 3.07%)~2.46s2.68sp=0.810 n=6
Total Time43.90s (± 0.21%)44.57s (± 0.33%)+0.67s (+ 1.52%)44.31s44.70sp=0.005 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,206256,230+24 (+ 0.01%)~~p=0.001 n=6
Types103,653103,658+5 (+ 0.00%)~~p=0.001 n=6
Memory used424,241k (± 0.01%)424,606k (± 0.01%)+366k (+ 0.09%)424,520k424,676kp=0.005 n=6
Parse Time3.35s (± 1.01%)3.35s (± 1.06%)~3.30s3.38sp=1.000 n=6
Bind Time1.29s (± 0.98%)1.30s (± 0.90%)~1.29s1.32sp=0.210 n=6
Check Time18.26s (± 0.23%)18.59s (± 0.34%)+0.33s (+ 1.80%)18.47s18.63sp=0.005 n=6
Emit Time1.36s (± 1.78%)1.34s (± 2.53%)~1.28s1.37sp=0.253 n=6
Total Time24.26s (± 0.16%)24.58s (± 0.39%)+0.32s (+ 1.32%)24.43s24.67sp=0.005 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,824224,824~~~p=1.000 n=6
Types93,39093,390~~~p=1.000 n=6
Memory used369,317k (± 0.01%)369,429k (± 0.02%)+112k (+ 0.03%)369,370k369,555kp=0.008 n=6
Parse Time3.46s (± 0.89%)3.51s (± 0.91%)+0.05s (+ 1.49%)3.46s3.54sp=0.036 n=6
Bind Time1.92s (± 1.35%)1.95s (± 0.70%)~1.92s1.96sp=0.080 n=6
Check Time19.36s (± 0.28%)19.70s (± 0.35%)+0.34s (+ 1.77%)19.59s19.77sp=0.005 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.74s (± 0.38%)25.17s (± 0.18%)+0.43s (+ 1.73%)25.09s25.22sp=0.005 n=6
vscode - node (v18.15.0, x64)
Errors44~~~p=1.000 n=6
Symbols2,799,5442,799,544~~~p=1.000 n=6
Types950,964950,949-15 (- 0.00%)~~p=0.001 n=6
Memory used2,927,255k (± 0.00%)2,927,043k (± 0.01%)~2,926,649k2,927,411kp=0.936 n=6
Parse Time16.41s (± 0.11%)16.45s (± 0.33%)~16.39s16.54sp=0.191 n=6
Bind Time5.11s (± 2.17%)4.97s (± 0.44%)-0.14s (- 2.68%)4.94s5.00sp=0.010 n=6
Check Time88.98s (± 0.33%)90.16s (± 0.45%)+1.18s (+ 1.32%)89.76s90.79sp=0.005 n=6
Emit Time23.94s (± 0.84%)25.37s (± 6.78%)~23.70s27.20sp=0.298 n=6
Total Time134.44s (± 0.26%)136.95s (± 1.36%)+2.51s (+ 1.87%)134.88s138.87sp=0.005 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols265,858265,858~~~p=1.000 n=6
Types108,442108,419-23 (- 0.02%)~~p=0.001 n=6
Memory used410,441k (± 0.02%)410,466k (± 0.02%)~410,384k410,629kp=0.297 n=6
Parse Time4.80s (± 0.54%)4.76s (± 0.45%)-0.04s (- 0.87%)4.73s4.79sp=0.030 n=6
Bind Time2.07s (± 1.00%)2.06s (± 1.55%)~2.01s2.09sp=0.560 n=6
Check Time21.07s (± 0.43%)21.31s (± 0.45%)+0.24s (+ 1.15%)21.19s21.44sp=0.008 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.95s (± 0.39%)28.14s (± 0.31%)+0.19s (+ 0.69%)28.03s28.27sp=0.020 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols524,146524,146~~~p=1.000 n=6
Types178,732178,732~~~p=1.000 n=6
Memory used461,403k (± 0.02%)461,409k (± 0.01%)~461,348k461,476kp=0.810 n=6
Parse Time3.90s (± 0.69%)3.89s (± 0.70%)~3.86s3.94sp=0.418 n=6
Bind Time1.47s (± 1.74%)1.47s (± 0.82%)~1.46s1.49sp=0.871 n=6
Check Time22.60s (± 0.58%)22.73s (± 0.82%)~22.53s23.03sp=0.128 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.97s (± 0.41%)28.10s (± 0.57%)~27.92s28.37sp=0.149 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@weswigham

Copy link
Copy Markdown
MemberAuthor

Better - down to 1-2% check time, if any, but hopefully I can manage a bit more... The only thing now would seem to be that some of the checks on location (and weather it counts as a location whose reference we should mark) are repeated between caller and within the reference marker. I can probably do some hinting like the emitter does to avoid those at callsites where we know the input location's shape in advance.

@weswigham

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this faster

@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 30, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Wesley Wigham (@weswigham)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,154~~~p=1.000 n=6
Types50,27350,273~~~p=1.000 n=6
Memory used193,481k (± 0.91%)192,899k (± 0.74%)~192,214k195,792kp=1.000 n=6
Parse Time1.30s (± 1.06%)1.29s (± 1.30%)~1.27s1.31sp=0.675 n=6
Bind Time0.72s0.72s~~~p=1.000 n=6
Check Time9.55s (± 0.15%)9.74s (± 0.22%)+0.19s (+ 1.97%)9.70s9.76sp=0.005 n=6
Emit Time2.62s (± 0.38%)2.62s (± 0.16%)~2.62s2.63sp=0.487 n=6
Total Time14.19s (± 0.19%)14.37s (± 0.12%)+0.18s (+ 1.29%)14.35s14.40sp=0.005 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols945,322945,322~~~p=1.000 n=6
Types408,088408,087-1 (- 0.00%)~~p=0.001 n=6
Memory used1,222,092k (± 0.01%)1,222,124k (± 0.00%)~1,222,080k1,222,173kp=0.810 n=6
Parse Time8.07s (± 0.69%)8.09s (± 0.73%)~8.03s8.20sp=0.520 n=6
Bind Time2.22s (± 0.61%)2.22s (± 0.60%)~2.21s2.24sp=0.869 n=6
Check Time36.50s (± 0.25%)37.13s (± 0.49%)+0.63s (+ 1.72%)36.97s37.38sp=0.005 n=6
Emit Time17.35s (± 0.42%)17.32s (± 0.65%)~17.14s17.46sp=0.936 n=6
Total Time64.14s (± 0.24%)64.77s (± 0.38%)+0.63s (+ 0.98%)64.51s65.15sp=0.005 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,956,0601,956,087+27 (+ 0.00%)~~p=0.001 n=6
Types676,357676,366+9 (+ 0.00%)~~p=0.001 n=6
Memory used1,754,575k (± 0.00%)1,754,675k (± 0.00%)+100k (+ 0.01%)1,754,646k1,754,701kp=0.005 n=6
Parse Time6.70s (± 0.22%)6.72s (± 0.42%)~6.69s6.76sp=0.164 n=6
Bind Time2.30s (± 0.45%)2.30s (± 0.64%)~2.28s2.32sp=0.510 n=6
Check Time56.73s (± 0.23%)57.13s (± 0.48%)+0.40s (+ 0.70%)56.71s57.48sp=0.030 n=6
Emit Time0.14s (± 4.05%)0.14s (± 3.60%)🔻+0.01s (+ 6.17%)0.14s0.15sp=0.038 n=6
Total Time65.87s (± 0.22%)66.29s (± 0.43%)+0.42s (+ 0.64%)65.83s66.65sp=0.031 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,215,7161,215,740+24 (+ 0.00%)~~p=0.001 n=6
Types257,646257,646~~~p=1.000 n=6
Memory used2,324,123k (± 0.04%)2,325,288k (± 0.01%)~2,325,075k2,325,760kp=0.066 n=6
Parse Time5.94s (± 0.77%)5.99s (± 1.17%)~5.87s6.07sp=0.199 n=6
Bind Time2.19s (± 1.13%)2.20s (± 0.95%)~2.18s2.23sp=0.574 n=6
Check Time39.81s (± 0.42%)40.46s (± 0.57%)+0.65s (+ 1.62%)40.27s40.91sp=0.005 n=6
Emit Time3.11s (± 2.74%)3.13s (± 1.24%)~3.07s3.18sp=1.000 n=6
Total Time51.08s (± 0.28%)51.82s (± 0.53%)+0.74s (+ 1.46%)51.58s52.35sp=0.005 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,215,7161,215,740+24 (+ 0.00%)~~p=0.001 n=6
Types257,646257,646~~~p=1.000 n=6
Memory used2,398,777k (± 0.03%)2,400,642k (± 0.03%)+1,865k (+ 0.08%)2,399,857k2,401,848kp=0.008 n=6
Parse Time7.70s (± 0.84%)7.76s (± 0.95%)~7.65s7.84sp=0.230 n=6
Bind Time2.44s (± 0.99%)2.45s (± 1.09%)~2.40s2.47sp=0.748 n=6
Check Time50.25s (± 0.32%)50.93s (± 0.40%)+0.68s (+ 1.36%)50.69s51.25sp=0.005 n=6
Emit Time3.88s (± 1.96%)3.83s (± 2.34%)~3.65s3.89sp=0.471 n=6
Total Time64.32s (± 0.38%)65.00s (± 0.28%)+0.68s (+ 1.05%)64.79s65.24sp=0.005 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,202256,226+24 (+ 0.01%)~~p=0.001 n=6
Types103,652103,657+5 (+ 0.00%)~~p=0.001 n=6
Memory used424,223k (± 0.01%)424,537k (± 0.01%)+314k (+ 0.07%)424,510k424,558kp=0.005 n=6
Parse Time3.36s (± 0.31%)3.36s (± 1.04%)~3.33s3.42sp=0.511 n=6
Bind Time1.31s (± 2.05%)1.31s (± 0.39%)~1.30s1.31sp=0.796 n=6
Check Time18.33s (± 0.43%)18.67s (± 0.41%)+0.35s (+ 1.89%)18.56s18.78sp=0.005 n=6
Emit Time1.34s (± 2.51%)1.36s (± 1.26%)~1.33s1.38sp=0.405 n=6
Total Time24.34s (± 0.46%)24.70s (± 0.35%)+0.36s (+ 1.50%)24.57s24.80sp=0.005 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,824224,824~~~p=1.000 n=6
Types93,39093,390~~~p=1.000 n=6
Memory used369,361k (± 0.02%)369,390k (± 0.01%)~369,334k369,473kp=0.261 n=6
Parse Time3.51s (± 0.85%)3.51s (± 1.31%)~3.45s3.59sp=0.871 n=6
Bind Time1.94s (± 1.20%)1.95s (± 0.77%)~1.92s1.96sp=1.000 n=6
Check Time19.44s (± 0.37%)19.77s (± 0.36%)+0.32s (+ 1.66%)19.66s19.84sp=0.005 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.89s (± 0.33%)25.22s (± 0.40%)+0.33s (+ 1.32%)25.09s25.35sp=0.005 n=6
vscode - node (v18.15.0, x64)
Errors44~~~p=1.000 n=6
Symbols2,799,5462,799,546~~~p=1.000 n=6
Types950,957950,942-15 (- 0.00%)~~p=0.001 n=6
Memory used2,927,080k (± 0.00%)2,927,098k (± 0.02%)~2,926,497k2,927,795kp=0.378 n=6
Parse Time13.30s (± 0.23%)13.36s (± 0.28%)+0.05s (+ 0.39%)13.33s13.41sp=0.029 n=6
Bind Time4.19s (± 2.75%)4.19s (± 2.62%)~4.08s4.30sp=0.871 n=6
Check Time73.03s (± 0.42%)74.01s (± 0.50%)+0.98s (+ 1.34%)73.54s74.58sp=0.008 n=6
Emit Time20.29s (± 8.28%)20.74s (± 7.51%)~19.65s23.43sp=0.128 n=6
Total Time110.82s (± 1.73%)112.29s (± 1.49%)+1.47s (+ 1.33%)110.84s114.89sp=0.045 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols265,858265,858~~~p=1.000 n=6
Types108,442108,419-23 (- 0.02%)~~p=0.001 n=6
Memory used410,428k (± 0.02%)410,498k (± 0.01%)~410,448k410,609kp=0.093 n=6
Parse Time4.76s (± 1.15%)4.76s (± 0.66%)~4.71s4.80sp=1.000 n=6
Bind Time2.07s (± 1.45%)2.06s (± 1.04%)~2.03s2.09sp=0.570 n=6
Check Time21.13s (± 0.16%)21.32s (± 0.31%)+0.20s (+ 0.94%)21.22s21.41sp=0.005 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.95s (± 0.26%)28.14s (± 0.24%)+0.20s (+ 0.70%)28.05s28.23sp=0.005 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols524,146524,146~~~p=1.000 n=6
Types178,732178,732~~~p=1.000 n=6
Memory used461,384k (± 0.02%)461,443k (± 0.02%)~461,330k461,578kp=0.378 n=6
Parse Time3.89s (± 0.64%)3.90s (± 0.64%)~3.87s3.94sp=0.808 n=6
Bind Time1.48s (± 0.92%)1.46s (± 0.83%)~1.44s1.47sp=0.122 n=6
Check Time22.65s (± 0.58%)22.79s (± 0.53%)~22.62s22.92sp=0.109 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time28.02s (± 0.48%)28.15s (± 0.35%)~28.03s28.29sp=0.093 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@weswigham

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this faster

@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 30, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Wesley Wigham (@weswigham)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,154~~~p=1.000 n=6
Types50,27350,273~~~p=1.000 n=6
Memory used193,360k (± 1.03%)194,676k (± 0.98%)~192,203k196,043kp=0.230 n=6
Parse Time1.58s (± 0.67%)1.56s (± 1.67%)~1.52s1.59sp=0.370 n=6
Bind Time0.86s (± 1.20%)0.87s (± 0.93%)~0.86s0.88sp=0.112 n=6
Check Time11.29s (± 0.52%)11.31s (± 0.68%)~11.24s11.42sp=0.936 n=6
Emit Time3.16s (± 0.51%)3.14s (± 0.47%)~3.11s3.15sp=0.080 n=6
Total Time16.89s (± 0.29%)16.88s (± 0.54%)~16.74s16.99sp=1.000 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols945,322945,322~~~p=1.000 n=6
Types408,088408,087-1 (- 0.00%)~~p=0.001 n=6
Memory used1,222,766k (± 0.01%)1,222,841k (± 0.00%)+75k (+ 0.01%)1,222,784k1,222,879kp=0.020 n=6
Parse Time6.77s (± 0.50%)6.78s (± 0.43%)~6.73s6.82sp=0.935 n=6
Bind Time1.87s (± 0.48%)1.87s (± 0.34%)~1.86s1.88sp=1.000 n=6
Check Time31.20s (± 0.19%)31.37s (± 0.53%)+0.17s (+ 0.54%)31.18s31.66sp=0.037 n=6
Emit Time14.62s (± 0.68%)14.65s (± 0.70%)~14.53s14.76sp=0.810 n=6
Total Time54.46s (± 0.26%)54.66s (± 0.15%)+0.20s (+ 0.37%)54.57s54.80sp=0.008 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,956,1641,956,164~~~p=1.000 n=6
Types676,919676,919~~~p=1.000 n=6
Memory used1,757,687k (± 0.00%)1,757,758k (± 0.00%)~1,757,656k1,757,832kp=0.066 n=6
Parse Time7.91s (± 0.53%)7.92s (± 0.41%)~7.86s7.96sp=0.936 n=6
Bind Time2.72s (± 0.70%)2.73s (± 0.76%)~2.69s2.75sp=0.684 n=6
Check Time65.81s (± 0.37%)65.73s (± 0.19%)~65.61s65.91sp=0.574 n=6
Emit Time0.16s0.16s (± 4.99%)~0.16s0.18sp=0.405 n=6
Total Time76.60s (± 0.34%)76.55s (± 0.18%)~76.38s76.73sp=1.000 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,217,1241,217,207+83 (+ 0.01%)~~p=0.001 n=6
Types258,216258,242+26 (+ 0.01%)~~p=0.001 n=6
Memory used2,443,729k (±11.70%)2,327,563k (± 0.04%)~2,326,232k2,328,671kp=0.378 n=6
Parse Time7.43s (± 1.29%)7.42s (± 1.39%)~7.27s7.54sp=1.000 n=6
Bind Time2.71s (± 1.57%)2.73s (± 0.44%)~2.71s2.74sp=0.872 n=6
Check Time48.86s (± 0.79%)48.93s (± 0.42%)~48.75s49.31sp=0.575 n=6
Emit Time3.86s (± 1.43%)3.90s (± 1.87%)~3.84s4.03sp=0.423 n=6
Total Time62.90s (± 0.63%)63.00s (± 0.43%)~62.69s63.45sp=0.471 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,217,1241,217,207+83 (+ 0.01%)~~p=0.001 n=6
Types258,216258,242+26 (+ 0.01%)~~p=0.001 n=6
Memory used2,402,304k (± 0.03%)2,403,016k (± 0.02%)~2,402,410k2,403,706kp=0.093 n=6
Parse Time7.66s (± 0.91%)7.69s (± 0.99%)~7.60s7.78sp=0.575 n=6
Bind Time2.45s (± 0.80%)2.46s (± 0.80%)~2.43s2.48sp=0.373 n=6
Check Time49.44s (± 0.38%)49.93s (± 0.65%)+0.49s (+ 0.99%)49.52s50.41sp=0.020 n=6
Emit Time3.85s (± 2.50%)3.92s (± 0.98%)~3.88s3.99sp=0.066 n=6
Total Time63.43s (± 0.33%)64.02s (± 0.52%)+0.59s (+ 0.93%)63.57s64.58sp=0.013 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,229256,312+83 (+ 0.03%)~~p=0.001 n=6
Types103,713103,744+31 (+ 0.03%)~~p=0.001 n=6
Memory used424,258k (± 0.00%)424,637k (± 0.01%)+379k (+ 0.09%)424,603k424,680kp=0.005 n=6
Parse Time4.16s (± 0.88%)4.16s (± 0.83%)~4.10s4.20sp=1.000 n=6
Bind Time1.60s (± 0.85%)1.59s (± 1.22%)~1.56s1.61sp=0.251 n=6
Check Time21.88s (± 0.26%)22.06s (± 0.54%)+0.17s (+ 0.78%)21.88s22.25sp=0.020 n=6
Emit Time1.74s (± 1.08%)1.74s (± 1.52%)~1.69s1.76sp=0.157 n=6
Total Time29.38s (± 0.21%)29.54s (± 0.39%)+0.17s (+ 0.57%)29.37s29.70sp=0.013 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,824224,824~~~p=1.000 n=6
Types93,39093,390~~~p=1.000 n=6
Memory used369,308k (± 0.01%)369,372k (± 0.02%)+64k (+ 0.02%)369,322k369,492kp=0.031 n=6
Parse Time3.52s (± 0.89%)3.50s (± 0.88%)~3.45s3.53sp=0.686 n=6
Bind Time1.93s (± 1.20%)1.94s (± 1.19%)~1.91s1.97sp=0.468 n=6
Check Time19.32s (± 0.33%)19.44s (± 0.35%)+0.12s (+ 0.63%)19.36s19.55sp=0.025 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.77s (± 0.27%)24.89s (± 0.30%)+0.12s (+ 0.47%)24.80s24.98sp=0.037 n=6
vscode - node (v18.15.0, x64)
Errors44~~~p=1.000 n=6
Symbols2,799,5822,799,582~~~p=1.000 n=6
Types950,968950,953-15 (- 0.00%)~~p=0.001 n=6
Memory used2,928,416k (± 0.00%)2,928,231k (± 0.01%)~2,927,892k2,928,601kp=0.810 n=6
Parse Time13.34s (± 0.46%)13.40s (± 0.79%)~13.28s13.56sp=0.422 n=6
Bind Time4.17s (± 2.59%)4.26s (± 1.85%)~4.10s4.30sp=0.222 n=6
Check Time72.83s (± 0.60%)73.00s (± 0.37%)~72.76s73.51sp=0.689 n=6
Emit Time21.06s (± 9.94%)20.72s (± 5.89%)~19.56s22.50sp=1.000 n=6
Total Time111.41s (± 2.11%)111.38s (± 1.02%)~110.19s112.96sp=0.423 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols265,858265,858~~~p=1.000 n=6
Types108,442108,419-23 (- 0.02%)~~p=0.001 n=6
Memory used410,497k (± 0.03%)410,504k (± 0.03%)~410,411k410,695kp=1.000 n=6
Parse Time4.77s (± 0.64%)4.78s (± 0.81%)~4.71s4.82sp=0.517 n=6
Bind Time2.07s (± 0.50%)2.08s (± 0.85%)~2.06s2.10sp=0.565 n=6
Check Time20.95s (± 0.37%)21.02s (± 0.48%)~20.93s21.19sp=0.127 n=6
Emit Time0.00s (±244.70%)0.00s~~~p=0.405 n=6
Total Time27.79s (± 0.25%)27.88s (± 0.34%)~27.77s28.05sp=0.107 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols524,146524,146~~~p=1.000 n=6
Types178,732178,732~~~p=1.000 n=6
Memory used462,151k (± 0.01%)462,138k (± 0.03%)~462,021k462,347kp=0.575 n=6
Parse Time3.11s (± 1.14%)3.13s (± 0.72%)~3.08s3.14sp=0.567 n=6
Bind Time1.18s (± 0.69%)1.19s (± 0.63%)~1.18s1.20sp=0.383 n=6
Check Time18.15s (± 0.58%)18.18s (± 0.57%)~18.08s18.36sp=1.000 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time22.45s (± 0.35%)22.50s (± 0.44%)~22.41s22.68sp=0.630 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@weswigham

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this faster

@typescript-bot

TypeScript Bot (typescript-bot) commented May 1, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Wesley Wigham (@weswigham)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,154~~~p=1.000 n=6
Types50,27350,273~~~p=1.000 n=6
Memory used194,027k (± 1.01%)192,846k (± 0.77%)~192,193k195,884kp=0.689 n=6
Parse Time1.30s (± 0.94%)1.30s (± 0.58%)~1.29s1.31sp=0.555 n=6
Bind Time0.72s0.72s~~~p=1.000 n=6
Check Time9.56s (± 0.46%)9.58s (± 0.57%)~9.52s9.65sp=0.517 n=6
Emit Time2.63s (± 0.54%)2.64s (± 0.57%)~2.62s2.66sp=0.683 n=6
Total Time14.20s (± 0.35%)14.23s (± 0.43%)~14.15s14.30sp=0.336 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols945,322945,322~~~p=1.000 n=6
Types408,088408,087-1 (- 0.00%)~~p=0.001 n=6
Memory used1,222,805k (± 0.01%)1,222,834k (± 0.01%)~1,222,744k1,222,948kp=0.575 n=6
Parse Time8.09s (± 0.54%)8.13s (± 0.58%)~8.05s8.18sp=0.198 n=6
Bind Time2.24s (± 0.82%)2.24s (± 0.47%)~2.22s2.25sp=0.681 n=6
Check Time36.69s (± 0.27%)36.65s (± 0.30%)~36.50s36.79sp=0.688 n=6
Emit Time17.41s (± 0.92%)17.43s (± 0.45%)~17.34s17.54sp=0.936 n=6
Total Time64.43s (± 0.42%)64.44s (± 0.24%)~64.30s64.70sp=0.810 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,956,1641,956,164~~~p=1.000 n=6
Types676,919676,919~~~p=1.000 n=6
Memory used1,757,661k (± 0.00%)1,757,732k (± 0.00%)+71k (+ 0.00%)1,757,671k1,757,806kp=0.020 n=6
Parse Time7.93s (± 0.35%)7.93s (± 0.43%)~7.89s7.99sp=0.803 n=6
Bind Time2.72s (± 0.52%)2.71s (± 0.59%)~2.68s2.72sp=0.279 n=6
Check Time65.89s (± 0.62%)66.09s (± 0.17%)~65.91s66.23sp=0.229 n=6
Emit Time0.16s (± 4.99%)0.16s (± 4.99%)~0.16s0.18sp=1.000 n=6
Total Time76.70s (± 0.54%)76.89s (± 0.14%)~76.77s77.02sp=0.199 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,217,1321,217,215+83 (+ 0.01%)~~p=0.001 n=6
Types258,232258,258+26 (+ 0.01%)~~p=0.001 n=6
Memory used2,326,675k (± 0.02%)2,328,056k (± 0.02%)+1,382k (+ 0.06%)2,327,072k2,328,665kp=0.013 n=6
Parse Time4.93s (± 0.49%)4.92s (± 0.81%)~4.88s4.96sp=0.810 n=6
Bind Time1.87s (± 0.89%)1.87s (± 1.20%)~1.85s1.90sp=0.806 n=6
Check Time33.41s (± 0.63%)33.61s (± 0.39%)~33.49s33.81sp=0.149 n=6
Emit Time2.61s (± 1.44%)2.59s (± 2.89%)~2.46s2.66sp=1.000 n=6
Total Time42.82s (± 0.62%)43.01s (± 0.26%)~42.93s43.22sp=0.228 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,217,1321,217,215+83 (+ 0.01%)~~p=0.001 n=6
Types258,232258,258+26 (+ 0.01%)~~p=0.001 n=6
Memory used2,402,350k (± 0.04%)2,403,602k (± 0.03%)+1,252k (+ 0.05%)2,403,011k2,404,550kp=0.045 n=6
Parse Time5.14s (± 1.43%)5.15s (± 0.89%)~5.08s5.21sp=0.810 n=6
Bind Time1.67s (± 1.07%)1.67s (± 0.73%)~1.65s1.68sp=0.737 n=6
Check Time33.99s (± 0.22%)34.19s (± 0.49%)+0.20s (+ 0.58%)33.94s34.35sp=0.045 n=6
Emit Time2.62s (± 2.56%)2.59s (± 2.12%)~2.49s2.64sp=0.571 n=6
Total Time43.42s (± 0.21%)43.61s (± 0.46%)~43.33s43.82sp=0.128 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,229256,312+83 (+ 0.03%)~~p=0.001 n=6
Types103,713103,744+31 (+ 0.03%)~~p=0.001 n=6
Memory used424,254k (± 0.01%)424,656k (± 0.01%)+403k (+ 0.09%)424,599k424,705kp=0.005 n=6
Parse Time2.77s (± 0.70%)2.79s (± 0.49%)~2.76s2.80sp=0.188 n=6
Bind Time1.09s (± 1.00%)1.09s (± 0.69%)~1.08s1.10sp=0.604 n=6
Check Time15.06s (± 0.38%)15.13s (± 0.38%)~15.06s15.21sp=0.107 n=6
Emit Time1.15s (± 1.88%)1.14s (± 1.32%)~1.11s1.15sp=0.515 n=6
Total Time20.07s (± 0.25%)20.14s (± 0.36%)~20.04s20.25sp=0.109 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,824224,824~~~p=1.000 n=6
Types93,39093,390~~~p=1.000 n=6
Memory used369,432k (± 0.04%)369,421k (± 0.03%)~369,321k369,633kp=1.000 n=6
Parse Time2.84s (± 0.99%)2.83s (± 0.47%)~2.81s2.85sp=0.221 n=6
Bind Time1.58s (± 1.11%)1.58s (± 0.69%)~1.57s1.60sp=0.867 n=6
Check Time15.61s (± 0.40%)15.71s (± 0.30%)+0.10s (+ 0.65%)15.62s15.74sp=0.019 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time20.03s (± 0.28%)20.11s (± 0.23%)+0.09s (+ 0.43%)20.03s20.15sp=0.020 n=6
vscode - node (v18.15.0, x64)
Errors44~~~p=1.000 n=6
Symbols2,800,9912,800,991~~~p=1.000 n=6
Types951,405951,390-15 (- 0.00%)~~p=0.001 n=6
Memory used2,948,511k (± 0.00%)2,948,573k (± 0.00%)+62k (+ 0.00%)2,948,501k2,948,657kp=0.045 n=6
Parse Time13.48s (± 0.30%)13.50s (± 0.34%)~13.45s13.57sp=0.683 n=6
Bind Time4.11s (± 0.25%)4.09s (± 0.15%)-0.02s (- 0.57%)4.08s4.10sp=0.005 n=6
Check Time72.84s (± 0.15%)73.49s (± 0.27%)+0.65s (+ 0.90%)73.23s73.80sp=0.005 n=6
Emit Time23.60s (± 0.53%)23.63s (± 0.61%)~23.48s23.84sp=0.748 n=6
Total Time114.04s (± 0.19%)114.71s (± 0.21%)+0.67s (+ 0.59%)114.40s115.08sp=0.005 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols265,858265,858~~~p=1.000 n=6
Types108,442108,419-23 (- 0.02%)~~p=0.001 n=6
Memory used410,433k (± 0.01%)410,473k (± 0.02%)~410,366k410,568kp=0.471 n=6
Parse Time4.80s (± 0.66%)4.76s (± 0.62%)~4.72s4.80sp=0.090 n=6
Bind Time2.07s (± 0.79%)2.09s (± 0.58%)~2.07s2.10sp=0.062 n=6
Check Time21.03s (± 0.47%)21.04s (± 0.25%)~20.99s21.13sp=0.872 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.90s (± 0.27%)27.89s (± 0.16%)~27.86s27.98sp=1.000 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols524,146524,146~~~p=1.000 n=6
Types178,732178,732~~~p=1.000 n=6
Memory used462,163k (± 0.01%)462,198k (± 0.01%)~462,132k462,244kp=0.378 n=6
Parse Time3.89s (± 0.60%)3.89s (± 0.85%)~3.87s3.96sp=1.000 n=6
Bind Time1.46s (± 0.80%)1.47s (± 0.70%)~1.45s1.48sp=0.456 n=6
Check Time22.32s (± 0.59%)22.38s (± 0.53%)~22.25s22.56sp=0.521 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.67s (± 0.48%)27.74s (± 0.38%)~27.61s27.91sp=0.422 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This has been sorely needing a refactor for a long time 👍 It's still wild to look at how complicated it is, but at least it's all in one place now.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@weswigham@typescript-bot@andrewbranch@jakebailey