Skip to content

Optimize eagerly calculating CouldContainTypeVariables during object type instantiation - #54538

Merged
Wesley Wigham (weswigham) merged 2 commits into
microsoft:mainfrom
weswigham:eager-type-variable-containment-optimization
Jun 6, 2023
Merged

Optimize eagerly calculating CouldContainTypeVariables during object type instantiation#54538
Wesley Wigham (weswigham) merged 2 commits into
microsoft:mainfrom
weswigham:eager-type-variable-containment-optimization

Conversation

@weswigham

@weswighamWesley Wigham (weswigham) commented Jun 5, 2023

Copy link
Copy Markdown
Member

Basically, this conditionalizes the carrying-forward of type variable containment checks within getObjectTypeInstantiation more. The existing check pulls the flags forward onto primitives/unions/intersections which may result from instantiateMappedType unconditionally. This means we may mark unions and intersections as possibly containing type parameters when they in fact cannot.

Noticed this while rereviewing #53246 while reviewing #54507

within `getObjectTypeInstantiation` more. The existing check pulls the
flags forward onto primitives/unions/intersections which may result from
`instantiateMappedType` unconditionally. This means we may mark unions
and intersections as possibly containing type parameters when they in
fact cannot.
@weswigham

Copy link
Copy Markdown
MemberAuthor

TypeScript Bot (@typescript-bot) perf test this

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 5, 2023

Copy link
Copy Markdown
Contributor

Heya Wesley Wigham (@weswigham), I've started to run the perf test suite on this PR at 7698260. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

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

Here they are:

Compiler

Comparison Report - main..54538
Metricmain54538DeltaBestWorstp-value
Angular - node (v18.10.0, x64)
Memory used366,147k (± 0.00%)366,123k (± 0.01%)-24k (- 0.01%)366,097k366,153kp=0.030 n=6
Parse Time3.44s (± 0.24%)3.43s (± 0.34%)-0.02s (- 0.44%)3.42s3.45sp=0.047 n=6
Bind Time1.12s (± 0.56%)1.11s (± 0.46%)~1.11s1.12sp=0.091 n=6
Check Time8.80s (± 0.49%)8.78s (± 0.67%)~8.70s8.85sp=0.630 n=6
Emit Time7.50s (± 0.65%)7.45s (± 0.55%)~7.40s7.51sp=0.148 n=6
Total Time20.86s (± 0.36%)20.78s (± 0.44%)~20.68s20.88sp=0.092 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used192,573k (± 1.27%)191,181k (± 0.02%)~191,132k191,216kp=0.748 n=6
Parse Time1.52s (± 0.79%)1.49s (± 1.83%)~1.46s1.53sp=0.059 n=6
Bind Time0.78s (± 0.66%)0.77s (± 1.27%)~0.76s0.79sp=0.191 n=6
Check Time9.57s (± 0.70%)9.47s (± 0.11%)-0.09s (- 0.99%)9.46s9.48sp=0.004 n=6
Emit Time2.75s (± 0.63%)2.77s (± 0.84%)~2.74s2.80sp=0.460 n=6
Total Time14.62s (± 0.51%)14.50s (± 0.38%)-0.12s (- 0.80%)14.43s14.56sp=0.020 n=6
Monaco - node (v18.10.0, x64)
Memory used346,613k (± 0.01%)346,623k (± 0.01%)~346,577k346,673kp=0.688 n=6
Parse Time2.61s (± 1.66%)2.60s (± 0.86%)~2.58s2.63sp=0.872 n=6
Bind Time1.01s (± 0.75%)1.01s (± 1.25%)~0.99s1.03sp=0.788 n=6
Check Time7.15s (± 0.27%)7.13s (± 0.66%)~7.06s7.18sp=0.375 n=6
Emit Time4.25s (± 0.46%)4.24s (± 0.73%)~4.21s4.28sp=0.685 n=6
Total Time15.01s (± 0.40%)14.98s (± 0.12%)~14.96s15.01sp=0.469 n=6
TFS - node (v18.10.0, x64)
Memory used300,613k (± 0.01%)300,622k (± 0.00%)~300,602k300,635kp=0.261 n=6
Parse Time2.06s (± 1.70%)2.08s (± 0.94%)~2.06s2.11sp=0.373 n=6
Bind Time1.14s (± 0.96%)1.14s (± 1.29%)~1.13s1.17sp=1.000 n=6
Check Time6.62s (± 0.53%)6.65s (± 1.52%)~6.57s6.84sp=0.872 n=6
Emit Time3.89s (± 0.60%)3.89s (± 1.63%)~3.82s4.01sp=0.740 n=6
Total Time13.71s (± 0.60%)13.77s (± 0.92%)~13.65s13.97sp=0.470 n=6
material-ui - node (v18.10.0, x64)
Memory used481,732k (± 0.01%)481,778k (± 0.01%)~481,702k481,839kp=0.092 n=6
Parse Time3.13s (± 1.35%)3.12s (± 1.08%)~3.08s3.16sp=0.872 n=6
Bind Time0.91s (± 1.28%)0.91s (± 0.89%)~0.90s0.92sp=0.738 n=6
Check Time16.81s (± 0.79%)16.77s (± 0.27%)~16.71s16.84sp=0.873 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.85s (± 0.78%)20.81s (± 0.28%)~20.75s20.92sp=1.000 n=6
xstate - node (v18.10.0, x64)
Memory used563,032k (± 0.03%)563,160k (± 0.03%)~562,934k563,400kp=0.230 n=6
Parse Time3.85s (± 0.56%)3.84s (± 0.61%)~3.80s3.87sp=0.685 n=6
Bind Time1.64s (± 0.60%)1.64s (± 0.92%)~1.61s1.65sp=0.934 n=6
Check Time2.82s (± 1.26%)2.82s (± 0.41%)~2.80s2.83sp=1.000 n=6
Emit Time0.08s (± 0.00%)0.08s (± 0.00%)~0.08s0.08sp=1.000 n=6
Total Time8.38s (± 0.68%)8.38s (± 0.27%)~8.35s8.40sp=1.000 n=6
Angular - node (v16.17.1, x64)
Memory used365,511k (± 0.01%)365,519k (± 0.01%)~365,452k365,578kp=0.810 n=6
Parse Time3.58s (± 0.51%)3.57s (± 0.49%)~3.56s3.60sp=0.557 n=6
Bind Time1.18s (± 0.54%)1.18s (± 0.44%)~1.17s1.18sp=0.386 n=6
Check Time9.62s (± 0.24%)9.59s (± 0.51%)~9.54s9.68sp=0.198 n=6
Emit Time7.96s (± 0.39%)7.91s (± 0.84%)~7.84s8.03sp=0.128 n=6
Total Time22.34s (± 0.21%)22.25s (± 0.44%)~22.15s22.44sp=0.065 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used193,530k (± 0.70%)193,426k (± 0.67%)~192,848k196,056kp=0.173 n=6
Parse Time1.61s (± 1.52%)1.61s (± 0.72%)~1.60s1.63sp=1.000 n=6
Bind Time0.83s (± 0.49%)0.82s (± 0.63%)~0.82s0.83sp=0.112 n=6
Check Time10.25s (± 0.74%)10.20s (± 0.59%)~10.12s10.29sp=0.261 n=6
Emit Time3.01s (± 0.44%)3.00s (± 1.37%)~2.97s3.07sp=0.742 n=6
Total Time15.70s (± 0.59%)15.63s (± 0.55%)~15.51s15.74sp=0.295 n=6
Monaco - node (v16.17.1, x64)
Memory used345,883k (± 0.01%)345,878k (± 0.00%)~345,859k345,892kp=1.000 n=6
Parse Time2.73s (± 0.68%)2.72s (± 0.28%)~2.71s2.73sp=0.280 n=6
Bind Time1.09s (± 0.37%)1.08s (± 0.50%)~1.08s1.09sp=0.282 n=6
Check Time7.86s (± 0.45%)7.83s (± 0.39%)~7.80s7.88sp=0.225 n=6
Emit Time4.46s (± 0.79%)4.46s (± 0.87%)~4.41s4.52sp=0.872 n=6
Total Time16.14s (± 0.35%)16.10s (± 0.45%)~16.04s16.21sp=0.227 n=6
TFS - node (v16.17.1, x64)
Memory used299,955k (± 0.01%)299,969k (± 0.01%)~299,943k299,994kp=0.378 n=6
Parse Time2.16s (± 0.56%)2.18s (± 1.12%)~2.15s2.21sp=0.567 n=6
Bind Time1.24s (± 0.68%)1.24s (± 0.83%)~1.23s1.26sp=0.149 n=6
Check Time7.26s (± 0.50%)7.28s (± 0.42%)~7.24s7.32sp=0.871 n=6
Emit Time4.33s (± 0.41%)4.33s (± 0.64%)~4.29s4.36sp=0.934 n=6
Total Time15.00s (± 0.26%)15.03s (± 0.44%)~14.94s15.13sp=0.373 n=6
material-ui - node (v16.17.1, x64)
Memory used481,013k (± 0.01%)480,990k (± 0.00%)~480,972k481,006kp=0.261 n=6
Parse Time3.28s (± 0.49%)3.27s (± 0.50%)~3.25s3.29sp=0.737 n=6
Bind Time0.94s (± 0.43%)0.95s (± 1.09%)~0.94s0.96sp=0.461 n=6
Check Time17.84s (± 0.37%)17.89s (± 1.02%)~17.74s18.17sp=0.810 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time22.07s (± 0.33%)22.12s (± 0.85%)~21.96s22.39sp=0.748 n=6
xstate - node (v16.17.1, x64)
Memory used560,613k (± 0.01%)560,613k (± 0.02%)~560,466k560,770kp=1.000 n=6
Parse Time4.01s (± 0.58%)4.00s (± 0.72%)~3.98s4.05sp=0.629 n=6
Bind Time1.77s (± 0.29%)1.77s (± 0.80%)~1.75s1.79sp=0.667 n=6
Check Time3.05s (± 0.34%)3.06s (± 0.79%)~3.03s3.09sp=0.743 n=6
Emit Time0.09s (± 0.00%)0.09s (± 0.00%)~0.09s0.09sp=1.000 n=6
Total Time8.92s (± 0.33%)8.91s (± 0.36%)~8.88s8.96sp=0.573 n=6
Angular - node (v14.21.3, x64)
Memory used359,508k (± 0.00%)359,547k (± 0.01%)+40k (+ 0.01%)359,513k359,611kp=0.031 n=6
Parse Time3.70s (± 0.40%)3.67s (± 0.32%)-0.03s (- 0.81%)3.66s3.69sp=0.012 n=6
Bind Time1.22s (± 0.33%)1.22s (± 0.67%)~1.21s1.23sp=0.584 n=6
Check Time10.05s (± 0.49%)9.99s (± 0.55%)~9.93s10.08sp=0.126 n=6
Emit Time8.37s (± 1.03%)8.29s (± 0.80%)~8.23s8.38sp=0.199 n=6
Total Time23.33s (± 0.53%)23.17s (± 0.42%)~23.06s23.33sp=0.054 n=6
Compiler-Unions - node (v14.21.3, x64)
Memory used188,282k (± 0.01%)188,276k (± 0.01%)~188,248k188,306kp=0.630 n=6
Parse Time1.62s (± 0.96%)1.62s (± 0.65%)~1.60s1.63sp=0.621 n=6
Bind Time0.85s (± 0.00%)0.85s (± 0.89%)~0.84s0.86sp=0.598 n=6
Check Time10.35s (± 0.31%)10.29s (± 0.43%)-0.06s (- 0.60%)10.25s10.37sp=0.045 n=6
Emit Time3.15s (± 0.97%)3.12s (± 0.39%)~3.10s3.13sp=0.053 n=6
Total Time15.97s (± 0.37%)15.87s (± 0.32%)-0.10s (- 0.65%)15.83s15.97sp=0.024 n=6
Monaco - node (v14.21.3, x64)
Memory used341,039k (± 0.00%)341,040k (± 0.00%)~341,022k341,065kp=0.936 n=6
Parse Time2.83s (± 0.89%)2.80s (± 0.77%)~2.78s2.84sp=0.164 n=6
Bind Time1.12s (± 0.75%)1.11s (± 0.46%)~1.11s1.12sp=0.923 n=6
Check Time8.20s (± 0.26%)8.19s (± 0.54%)~8.14s8.26sp=0.570 n=6
Emit Time4.68s (± 0.52%)4.70s (± 0.63%)~4.67s4.75sp=0.289 n=6
Total Time16.82s (± 0.29%)16.81s (± 0.24%)~16.74s16.86sp=1.000 n=6
TFS - node (v14.21.3, x64)
Memory used295,133k (± 0.00%)295,139k (± 0.00%)~295,130k295,159kp=0.810 n=6
Parse Time2.42s (± 0.77%)2.42s (± 0.89%)~2.39s2.45sp=1.000 n=6
Bind Time1.07s (± 0.84%)1.07s (± 0.70%)~1.06s1.08sp=0.798 n=6
Check Time7.59s (± 0.46%)7.59s (± 0.47%)~7.54s7.64sp=1.000 n=6
Emit Time4.35s (± 1.16%)4.33s (± 0.83%)~4.28s4.38sp=0.327 n=6
Total Time15.43s (± 0.52%)15.41s (± 0.40%)~15.30s15.48sp=0.630 n=6
material-ui - node (v14.21.3, x64)
Memory used476,590k (± 0.00%)476,556k (± 0.01%)-34k (- 0.01%)476,524k476,585kp=0.020 n=6
Parse Time3.36s (± 0.55%)3.35s (± 0.52%)~3.33s3.38sp=0.743 n=6
Bind Time1.01s (± 0.40%)1.01s (± 0.40%)~1.01s1.02sp=1.000 n=6
Check Time18.77s (± 0.73%)18.75s (± 0.57%)~18.61s18.93sp=0.575 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time23.14s (± 0.67%)23.12s (± 0.41%)~23.00s23.27sp=0.471 n=6
xstate - node (v14.21.3, x64)
Memory used549,644k (± 0.00%)549,654k (± 0.00%)~549,642k549,663kp=0.109 n=6
Parse Time4.24s (± 0.49%)4.27s (± 0.72%)~4.22s4.30sp=0.092 n=6
Bind Time1.68s (± 0.48%)1.69s (± 0.87%)~1.67s1.71sp=0.677 n=6
Check Time3.20s (± 0.79%)3.19s (± 0.61%)~3.16s3.21sp=0.466 n=6
Emit Time0.09s (± 0.00%)0.09s (± 0.00%)~0.09s0.09sp=1.000 n=6
Total Time9.22s (± 0.24%)9.24s (± 0.48%)~9.16s9.28sp=0.170 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-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.21.3, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.21.3, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.21.3, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.21.3, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.21.3, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.21.3, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.21.3, x64)
BenchmarkNameIterations
Current545386
Baselinemain6

TSServer

Comparison Report - main..54538
Metricmain54538DeltaBestWorstp-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen2,567ms (± 0.97%)2,553ms (± 0.53%)~2,530ms2,566msp=0.423 n=6
Req 2 - geterr5,535ms (± 1.56%)5,526ms (± 1.65%)~5,349ms5,602msp=0.810 n=6
Req 3 - references338ms (± 0.76%)338ms (± 0.67%)~335ms341msp=0.935 n=6
Req 4 - navto287ms (± 0.57%)287ms (± 0.38%)~286ms289msp=0.741 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo84ms (± 0.89%)85ms (± 1.05%)~84ms86msp=0.149 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen2,656ms (± 0.85%)2,660ms (± 0.34%)~2,649ms2,675msp=1.000 n=6
Req 2 - geterr4,247ms (± 2.83%)4,312ms (± 0.49%)~4,284ms4,347msp=0.936 n=6
Req 3 - references349ms (± 1.31%)351ms (± 0.58%)~349ms355msp=0.418 n=6
Req 4 - navto292ms (± 0.73%)292ms (± 0.85%)~289ms295msp=0.934 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo64ms (± 4.84%)64ms (± 4.31%)~62ms69msp=0.452 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen3,101ms (± 0.55%)3,104ms (± 0.71%)~3,070ms3,135msp=0.873 n=6
Req 2 - geterr1,574ms (± 1.53%)1,575ms (± 1.28%)~1,551ms1,597msp=1.000 n=6
Req 3 - references113ms (± 2.19%)113ms (± 1.64%)~111ms116msp=0.871 n=6
Req 4 - navto361ms (± 0.72%)360ms (± 0.57%)~357ms362msp=0.514 n=6
Req 5 - completionInfo count2,864 (± 0.00%)2,864 (± 0.00%)~2,8642,864p=1.000 n=6
Req 5 - completionInfo378ms (± 3.36%)380ms (± 2.46%)~366ms387msp=0.470 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen2,683ms (± 0.73%)2,688ms (± 1.20%)~2,669ms2,753msp=0.810 n=6
Req 2 - geterr6,059ms (± 0.45%)5,990ms (± 1.71%)~5,789ms6,060msp=0.128 n=6
Req 3 - references352ms (± 0.43%)352ms (± 0.51%)~349ms354msp=0.869 n=6
Req 4 - navto288ms (± 1.02%)289ms (± 1.65%)~284ms295msp=0.625 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo91ms (± 5.77%)88ms (± 8.31%)~74ms94msp=0.334 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen2,858ms (± 0.47%)2,839ms (± 0.43%)-19ms (- 0.66%)2,819ms2,855msp=0.037 n=6
Req 2 - geterr4,687ms (± 0.17%)4,683ms (± 0.41%)~4,656ms4,710msp=0.629 n=6
Req 3 - references364ms (± 0.58%)366ms (± 0.50%)~364ms369msp=0.210 n=6
Req 4 - navto289ms (± 0.86%)289ms (± 1.06%)~285ms292msp=0.418 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo67ms (± 1.12%)67ms (± 1.12%)~66ms68msp=1.000 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen3,229ms (± 0.69%)3,235ms (± 0.48%)~3,215ms3,254msp=0.748 n=6
Req 2 - geterr1,745ms (± 1.14%)1,747ms (± 1.13%)~1,728ms1,779msp=0.809 n=6
Req 3 - references126ms (± 7.24%)123ms (± 0.51%)~122ms124msp=0.209 n=6
Req 4 - navto344ms (± 0.89%)343ms (± 0.63%)~340ms345msp=0.566 n=6
Req 5 - completionInfo count2,864 (± 0.00%)2,864 (± 0.00%)~2,8642,864p=1.000 n=6
Req 5 - completionInfo415ms (± 1.88%)410ms (± 2.15%)~402ms421msp=0.229 n=6
Compiler-UnionsTSServer - node (v14.21.3, x64)
Req 1 - updateOpen2,806ms (± 0.50%)2,799ms (± 0.42%)~2,782ms2,816msp=0.295 n=6
Req 2 - geterr6,196ms (± 0.45%)6,219ms (± 0.60%)~6,182ms6,280msp=0.810 n=6
Req 3 - references365ms (± 1.36%)362ms (± 0.62%)~358ms364msp=0.163 n=6
Req 4 - navto290ms (± 0.47%)288ms (± 0.52%)~287ms290msp=0.215 n=6
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)~1,3561,356p=1.000 n=6
Req 5 - completionInfo101ms (± 4.19%)102ms (± 2.09%)~99ms104msp=0.742 n=6
CompilerTSServer - node (v14.21.3, x64)
Req 1 - updateOpen2,985ms (± 0.70%)2,984ms (± 0.75%)~2,966ms3,022msp=0.936 n=6
Req 2 - geterr4,575ms (± 0.35%)4,530ms (± 0.33%)-45ms (- 0.99%)4,503ms4,545msp=0.005 n=6
Req 3 - references376ms (± 0.22%)372ms (± 0.46%)-4ms (- 1.11%)369ms374msp=0.005 n=6
Req 4 - navto299ms (± 0.44%)299ms (± 0.49%)~296ms300msp=1.000 n=6
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)~1,5181,518p=1.000 n=6
Req 5 - completionInfo76ms (± 1.07%)76ms (± 0.54%)~76ms77msp=0.584 n=6
xstateTSServer - node (v14.21.3, x64)
Req 1 - updateOpen3,488ms (± 0.49%)3,500ms (± 0.42%)~3,481ms3,521msp=0.336 n=6
Req 2 - geterr1,855ms (± 0.50%)1,838ms (± 0.53%)-17ms (- 0.89%)1,829ms1,856msp=0.024 n=6
Req 3 - references150ms (± 6.91%)149ms (± 9.28%)~131ms161msp=1.000 n=6
Req 4 - navto406ms (± 1.41%)402ms (± 1.47%)~397ms413msp=0.375 n=6
Req 5 - completionInfo count2,864 (± 0.00%)2,864 (± 0.00%)~2,8642,864p=1.000 n=6
Req 5 - completionInfo439ms (± 1.06%)434ms (± 2.58%)~424ms450msp=0.298 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-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.21.3, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.21.3, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.21.3, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.21.3, x64)
BenchmarkNameIterations
Current545386
Baselinemain6

Startup

Comparison Report - main..54538
Metricmain54538DeltaBestWorstp-value
tsc-startup - node (v16.17.1, x64)
Execution time142.03ms (± 0.23%)141.63ms (± 0.19%)-0.41ms (- 0.29%)140.94ms146.23msp=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time221.91ms (± 0.32%)220.81ms (± 0.16%)-1.10ms (- 0.49%)219.95ms224.96msp=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time224.43ms (± 0.37%)222.23ms (± 0.16%)-2.19ms (- 0.98%)221.34ms229.51msp=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time204.39ms (± 0.19%)204.14ms (± 0.15%)-0.25ms (- 0.12%)203.28ms207.66msp=0.000 n=600
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-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)
BenchmarkNameIterations
Current545386
Baselinemain6

Developer Information:

Download Benchmark

@weswigham

Wesley Wigham (weswigham) commented Jun 5, 2023

Copy link
Copy Markdown
MemberAuthor

Yep no change to material-ui, but tiny gains in Compiler-Unions! 🙂

@jakebaileyJake Bailey (jakebailey) left a comment

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 looks good to me.

Should we backport this fix instead of #54507 to 5.1? Or does that feel too unsafe for a bugfix? (Mainly, are there actually performance regressions in 5.1 due to the previous optimization sometimes being too conservative?)

@weswigham

Copy link
Copy Markdown
MemberAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 5, 2023

Copy link
Copy Markdown
Contributor

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

Update: The results are in!

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 5, 2023

Copy link
Copy Markdown
Contributor

Heya Wesley Wigham (@weswigham), I've started to run the extended test suite on this PR at 7698260. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Jun 5, 2023

Copy link
Copy Markdown
Contributor

Heya Wesley Wigham (@weswigham), I've started to run the parallelized Definitely Typed test suite on this PR at 7698260. You can monitor the build here.

Update: The results are in!

@weswigham

Copy link
Copy Markdown
MemberAuthor

Mainly, are there actually performance regressions in 5.1 due to the previous optimization sometimes being too conservative?

Probably, but the effect is small, as you can see.

@typescript-bot

Copy link
Copy Markdown
Contributor

Heya Wesley Wigham (@weswigham), I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Wesley Wigham (@weswigham) Here are the results of running the top-repos suite comparing main and refs/pull/54538/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Wesley Wigham (@weswigham), it looks like the DT test run failed. Please check the log for more details.
You can check the log here.

@Jolg42

Copy link
Copy Markdown

Wesley Wigham (@weswigham)Jake Bailey (@jakebailey) I wanted to mention here that it could be beneficial to backport this to 5.1, see for more details the following issue #54549 (comment)

I'm trying to connect the dots, I hope this helps
Thanks for the good work 💚

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@Jolg42@jakebailey