Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Monomorphic Symbol access#51880

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
rbuckton merged 1 commit intomainfrommonomorphic-symbol
Dec 15, 2022
Merged

Monomorphic Symbol access#51880

rbuckton merged 1 commit intomainfrommonomorphic-symbol
Dec 15, 2022

Conversation

rbuckton
Copy link
Contributor

@rbucktonrbuckton commentedDec 13, 2022
edited
Loading

In the same vein as#51682, this makesSymbol/TransientSymbol/MappedSymbol/ReverseMappedSymbol stable so that all symbol property access becomes monomorphic.

The main change is that rather than having all of theSymbolLinks properties directly onTransientSymbol, instead they are attached to alinks internal property that is unconditionally set on everySymbol to ensure the map remains stable.

Zzzen, zhangyuinfinite, wrslatz, ExE-Boss, wtlin1228, SlurpTheo, and johnsoncodehk reacted with thumbs up emoji
@typescript-bottypescript-bot added Author: Team For Uncommitted BugPR for untriaged, rejected, closed or missing bug labelsDec 13, 2022
@rbuckton
Copy link
ContributorAuthor

Need to wait on the benchmark CI to catch up to#51682 before I schedule a perf test run.

@rbuckton
Copy link
ContributorAuthor

@typescript-bot perf test

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 13, 2022
edited
Loading

Heya@rbuckton, I've started to run the perf test suite on this PR at4d64583. You can monitor the buildhere.

Update:The results are in!

@typescript-bot
Copy link
Collaborator

@rbuckton
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - main..51880
Metricmain51880DeltaBestWorst
Angular - node (v18.10.0, x64)
Memory used364,508k (± 0.01%)374,366k (± 0.02%)+9,858k (+ 2.70%)374,165k374,480k
Parse Time1.58s (± 0.71%)1.58s (± 0.88%)-0.01s (- 0.38%)1.55s1.61s
Bind Time0.55s (± 1.01%)0.54s (± 0.68%)-0.01s (- 2.19%)0.53s0.54s
Check Time3.89s (± 0.83%)3.73s (± 0.79%)🟩-0.16s (- 4.06%)3.68s3.80s
Emit Time3.93s (± 0.90%)3.85s (± 0.95%)-0.08s (- 1.96%)3.78s3.95s
Total Time9.95s (± 0.55%)9.69s (± 0.47%)-0.26s (- 2.59%)9.58s9.79s
Compiler-Unions - node (v18.10.0, x64)
Memory used197,917k (± 0.86%)204,620k (± 0.83%)+6,703k (+ 3.39%)200,035k205,827k
Parse Time0.62s (± 0.80%)0.63s (± 0.71%)+0.01s (+ 1.95%)0.62s0.64s
Bind Time0.35s (± 1.27%)0.35s (± 1.27%)0.00s ( 0.00%)0.34s0.36s
Check Time4.92s (± 0.65%)4.83s (± 1.13%)-0.09s (- 1.75%)4.68s4.93s
Emit Time1.44s (± 0.77%)1.44s (± 0.94%)-0.01s (- 0.42%)1.42s1.49s
Total Time7.33s (± 0.57%)7.25s (± 0.88%)-0.08s (- 1.08%)7.09s7.41s
Monaco - node (v18.10.0, x64)
Memory used347,203k (± 0.01%)356,305k (± 0.01%)+9,102k (+ 2.62%)356,177k356,430k
Parse Time1.18s (± 0.95%)1.19s (± 0.59%)+0.01s (+ 1.02%)1.18s1.21s
Bind Time0.51s (± 1.14%)0.50s (± 1.38%)-0.01s (- 2.37%)0.49s0.52s
Check Time3.65s (± 0.39%)3.52s (± 0.77%)🟩-0.13s (- 3.54%)3.45s3.58s
Emit Time2.05s (± 1.00%)2.06s (± 1.20%)+0.01s (+ 0.63%)2.02s2.11s
Total Time7.38s (± 0.43%)7.27s (± 0.53%)-0.11s (- 1.54%)7.16s7.33s
TFS - node (v18.10.0, x64)
Memory used306,099k (± 0.24%)313,649k (± 0.26%)+7,550k (+ 2.47%)312,411k314,807k
Parse Time0.95s (± 1.31%)0.95s (± 1.05%)-0.00s (- 0.42%)0.93s0.97s
Bind Time0.53s (± 7.71%)0.57s (± 2.36%)+0.04s (+ 8.56%)0.52s0.59s
Check Time3.37s (± 0.62%)3.21s (± 0.63%)🟩-0.17s (- 4.92%)3.16s3.24s
Emit Time2.03s (± 1.24%)2.02s (± 1.31%)-0.01s (- 0.25%)1.97s2.08s
Total Time6.88s (± 0.67%)6.75s (± 0.59%)-0.13s (- 1.93%)6.67s6.84s
material-ui - node (v18.10.0, x64)
Memory used451,613k (± 0.01%)0k🟩-451,613k (-100.00%)0k0k
Parse Time1.34s (± 0.62%)0.00s🟩-1.34s (-100.00%)0.00s0.00s
Bind Time0.44s (± 1.71%)0.00s🟩-0.44s (-100.00%)0.00s0.00s
Check Time10.28s (± 0.65%)0.00s🟩-10.28s (-100.00%)0.00s0.00s
Emit Time0.00s (± 0.00%)0.00s0.00s ( NaN%)0.00s0.00s
Total Time12.06s (± 0.55%)0.00s🟩-12.06s (-100.00%)0.00s0.00s
xstate - node (v18.10.0, x64)
Memory used553,460k (± 0.01%)569,687k (± 0.01%)+16,228k (+ 2.93%)569,561k569,802k
Parse Time1.91s (± 0.50%)1.92s (± 0.49%)+0.01s (+ 0.31%)1.90s1.95s
Bind Time0.73s (± 3.09%)0.70s (± 2.68%)🟩-0.03s (- 4.38%)0.66s0.73s
Check Time1.03s (± 1.17%)1.00s (± 0.89%)-0.02s (- 2.24%)0.98s1.02s
Emit Time0.05s (± 0.00%)0.05s (± 0.00%)0.00s ( 0.00%)0.05s0.05s
Total Time3.72s (± 0.78%)3.68s (± 0.53%)-0.05s (- 1.32%)3.63s3.72s
Angular - node (v16.17.1, x64)
Memory used363,840k (± 0.02%)373,729k (± 0.02%)+9,889k (+ 2.72%)373,584k373,847k
Parse Time1.92s (± 0.53%)1.92s (± 0.79%)+0.00s (+ 0.05%)1.89s1.95s
Bind Time0.67s (± 1.03%)0.64s (± 0.92%)🟩-0.02s (- 3.16%)0.63s0.66s
Check Time5.03s (± 0.50%)4.82s (± 0.41%)🟩-0.21s (- 4.20%)4.79s4.87s
Emit Time4.69s (± 1.03%)4.60s (± 0.88%)-0.09s (- 1.84%)4.52s4.68s
Total Time12.30s (± 0.42%)11.98s (± 0.45%)-0.32s (- 2.59%)11.86s12.10s
Compiler-Unions - node (v16.17.1, x64)
Memory used199,821k (± 0.61%)202,768k (± 0.58%)+2,948k (+ 1.48%)201,637k205,351k
Parse Time0.80s (± 0.63%)0.80s (± 1.03%)+0.01s (+ 1.26%)0.79s0.83s
Bind Time0.44s (± 1.31%)0.44s (± 0.75%)-0.00s (- 0.68%)0.43s0.45s
Check Time5.91s (± 0.46%)5.65s (± 0.61%)🟩-0.25s (- 4.32%)5.57s5.73s
Emit Time1.82s (± 1.65%)1.78s (± 1.14%)-0.04s (- 2.03%)1.73s1.83s
Total Time8.97s (± 0.46%)8.68s (± 0.39%)🟩-0.29s (- 3.20%)8.58s8.74s
Monaco - node (v16.17.1, x64)
Memory used346,501k (± 0.02%)355,634k (± 0.01%)+9,133k (+ 2.64%)355,576k355,797k
Parse Time1.43s (± 0.74%)1.43s (± 0.58%)+0.01s (+ 0.56%)1.42s1.45s
Bind Time0.61s (± 1.06%)0.60s (± 0.87%)-0.01s (- 1.80%)0.59s0.61s
Check Time4.64s (± 0.46%)4.41s (± 0.39%)🟩-0.23s (- 4.98%)4.35s4.44s
Emit Time2.48s (± 0.78%)2.48s (± 0.85%)-0.00s (- 0.04%)2.45s2.53s
Total Time9.16s (± 0.51%)8.92s (± 0.41%)-0.23s (- 2.57%)8.85s9.01s
TFS - node (v16.17.1, x64)
Memory used304,144k (± 0.02%)312,055k (± 0.03%)+7,911k (+ 2.60%)311,983k312,366k
Parse Time1.20s (± 1.83%)1.20s (± 1.62%)+0.01s (+ 0.42%)1.17s1.25s
Bind Time0.58s (± 1.56%)0.57s (± 1.70%)-0.01s (- 2.07%)0.55s0.60s
Check Time4.34s (± 0.38%)4.11s (± 0.39%)🟩-0.22s (- 5.12%)4.09s4.15s
Emit Time2.52s (± 1.45%)2.48s (± 0.56%)-0.04s (- 1.71%)2.45s2.51s
Total Time8.63s (± 0.57%)8.36s (± 0.38%)🟩-0.28s (- 3.21%)8.29s8.41s
material-ui - node (v16.17.1, x64)
Memory used450,957k (± 0.01%)0k🟩-450,957k (-100.00%)0k0k
Parse Time1.68s (± 0.77%)0.00s🟩-1.68s (-100.00%)0.00s0.00s
Bind Time0.50s (± 0.66%)0.00s🟩-0.50s (-100.00%)0.00s0.00s
Check Time11.72s (± 0.73%)0.00s🟩-11.72s (-100.00%)0.00s0.00s
Emit Time0.00s (± 0.00%)0.00s0.00s ( NaN%)0.00s0.00s
Total Time13.89s (± 0.67%)0.00s🟩-13.89s (-100.00%)0.00s0.00s
xstate - node (v16.17.1, x64)
Memory used551,026k (± 0.01%)567,203k (± 0.01%)+16,177k (+ 2.94%)567,121k567,439k
Parse Time2.31s (± 0.35%)2.31s (± 0.35%)0.00s ( 0.00%)2.29s2.33s
Bind Time0.82s (± 1.79%)0.80s (± 2.04%)-0.02s (- 2.21%)0.77s0.84s
Check Time1.34s (± 0.75%)1.32s (± 0.49%)-0.02s (- 1.42%)1.30s1.33s
Emit Time0.06s (± 0.00%)0.06s (± 0.00%)0.00s ( 0.00%)0.06s0.06s
Total Time4.53s (± 0.44%)4.49s (± 0.42%)-0.03s (- 0.75%)4.44s4.52s
Angular - node (v14.15.1, x64)
Memory used357,711k (± 0.01%)367,534k (± 0.01%)+9,822k (+ 2.75%)367,503k367,601k
Parse Time2.04s (± 0.47%)2.05s (± 0.43%)+0.01s (+ 0.54%)2.03s2.07s
Bind Time0.71s (± 0.56%)0.69s (± 0.68%)-0.02s (- 2.68%)0.68s0.70s
Check Time5.34s (± 0.52%)5.13s (± 0.53%)🟩-0.21s (- 3.91%)5.06s5.21s
Emit Time4.80s (± 1.16%)4.72s (± 0.87%)-0.08s (- 1.71%)4.64s4.84s
Total Time12.90s (± 0.59%)12.59s (± 0.54%)-0.30s (- 2.36%)12.44s12.74s
Compiler-Unions - node (v14.15.1, x64)
Memory used195,545k (± 0.63%)199,802k (± 0.38%)+4,257k (+ 2.18%)196,769k200,204k
Parse Time0.90s (± 0.25%)0.90s (± 0.66%)+0.00s (+ 0.56%)0.89s0.92s
Bind Time0.47s (± 0.63%)0.47s (± 0.48%)-0.00s (- 0.64%)0.46s0.47s
Check Time6.17s (± 0.75%)5.91s (± 0.60%)🟩-0.27s (- 4.36%)5.82s5.99s
Emit Time1.93s (± 0.91%)1.89s (± 0.73%)-0.04s (- 2.02%)1.86s1.92s
Total Time9.47s (± 0.59%)9.17s (± 0.37%)🟩-0.30s (- 3.22%)9.08s9.24s
Monaco - node (v14.15.1, x64)
Memory used341,503k (± 0.00%)350,682k (± 0.01%)+9,179k (+ 2.69%)350,626k350,716k
Parse Time1.58s (± 0.86%)1.59s (± 0.59%)+0.01s (+ 0.51%)1.58s1.62s
Bind Time0.65s (± 0.62%)0.64s (± 0.70%)-0.01s (- 1.69%)0.63s0.65s
Check Time4.93s (± 0.44%)4.70s (± 0.39%)🟩-0.24s (- 4.79%)4.67s4.74s
Emit Time2.58s (± 0.83%)2.58s (± 0.58%)-0.01s (- 0.27%)2.54s2.60s
Total Time9.74s (± 0.41%)9.49s (± 0.29%)-0.24s (- 2.52%)9.44s9.57s
TFS - node (v14.15.1, x64)
Memory used301,271k (± 0.01%)309,075k (± 0.01%)+7,804k (+ 2.59%)309,009k309,125k
Parse Time1.32s (± 1.61%)1.36s (± 1.35%)+0.04s (+ 2.79%)1.32s1.40s
Bind Time0.60s (± 0.60%)0.60s (± 0.56%)-0.00s (- 0.17%)0.60s0.61s
Check Time4.60s (± 0.78%)4.38s (± 0.46%)🟩-0.23s (- 4.91%)4.34s4.43s
Emit Time2.78s (± 0.42%)2.76s (± 0.65%)-0.02s (- 0.79%)2.72s2.80s
Total Time9.31s (± 0.52%)9.10s (± 0.47%)-0.21s (- 2.31%)8.99s9.17s
material-ui - node (v14.15.1, x64)
Memory used446,774k (± 0.01%)0k🟩-446,774k (-100.00%)0k0k
Parse Time1.88s (± 0.47%)0.00s🟩-1.88s (-100.00%)0.00s0.00s
Bind Time0.54s (± 0.63%)0.00s🟩-0.54s (-100.00%)0.00s0.00s
Check Time11.95s (± 0.54%)0.00s🟩-11.95s (-100.00%)0.00s0.00s
Emit Time0.00s (± 0.00%)0.00s0.00s ( NaN%)0.00s0.00s
Total Time14.37s (± 0.48%)0.00s🟩-14.37s (-100.00%)0.00s0.00s
xstate - node (v14.15.1, x64)
Memory used539,642k (± 0.01%)555,871k (± 0.01%)+16,229k (+ 3.01%)555,756k556,042k
Parse Time2.62s (± 0.90%)2.66s (± 0.70%)+0.03s (+ 1.33%)2.61s2.69s
Bind Time0.82s (± 0.73%)0.79s (± 0.94%)🟩-0.03s (- 3.19%)0.77s0.80s
Check Time1.44s (± 0.59%)1.43s (± 0.35%)-0.02s (- 1.11%)1.42s1.44s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time4.96s (± 0.57%)4.95s (± 0.42%)-0.01s (- 0.16%)4.91s4.99s
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-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)
BenchmarkNameIterations
Current5188010
Baselinemain10

TSServer

Comparison Report - main..51880
Metricmain51880DeltaBestWorst
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,074ms (± 0.58%)1,078ms (± 0.69%)+4ms (+ 0.40%)1,067ms1,101ms
Req 2 - geterr2,550ms (± 0.86%)2,530ms (± 0.70%)-20ms (- 0.78%)2,492ms2,568ms
Req 3 - references165ms (± 1.05%)165ms (± 0.73%)-0ms (- 0.24%)161ms167ms
Req 4 - navto143ms (± 1.11%)144ms (± 1.17%)+1ms (+ 0.70%)141ms148ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo55ms (± 7.97%)55ms (± 7.91%)+0ms (+ 0.73%)49ms64ms
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,150ms (± 0.67%)1,141ms (± 0.68%)-9ms (- 0.77%)1,118ms1,160ms
Req 2 - geterr1,572ms (± 0.71%)1,582ms (± 0.94%)+10ms (+ 0.61%)1,557ms1,619ms
Req 3 - references173ms (± 0.85%)173ms (± 1.32%)+0ms (+ 0.17%)169ms181ms
Req 4 - navto153ms (± 0.32%)154ms (± 0.44%)+0ms (+ 0.13%)153ms156ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo53ms (± 2.09%)52ms (± 2.67%)-1ms (- 1.52%)47ms54ms
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,546ms (± 1.01%)1,559ms (± 0.58%)+13ms (+ 0.86%)1,534ms1,574ms
Req 2 - geterr544ms (± 1.41%)541ms (± 1.42%)-3ms (- 0.59%)522ms556ms
Req 3 - references57ms (± 1.93%)58ms (± 3.32%)+0ms (+ 0.52%)54ms62ms
Req 4 - navto195ms (± 1.96%)194ms (± 1.02%)-1ms (- 0.61%)191ms200ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo212ms (± 2.39%)209ms (± 0.83%)-3ms (- 1.42%)204ms213ms
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,330ms (± 0.66%)1,330ms (± 0.81%)-1ms (- 0.06%)1,302ms1,343ms
Req 2 - geterr3,176ms (± 0.69%)3,131ms (± 0.62%)-44ms (- 1.40%)3,075ms3,167ms
Req 3 - references196ms (± 1.28%)193ms (± 0.52%)-3ms (- 1.38%)192ms196ms
Req 4 - navto157ms (± 0.79%)157ms (± 0.86%)+0ms (+ 0.06%)152ms159ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo58ms (± 1.60%)58ms (± 2.14%)+1ms (+ 1.04%)56ms61ms
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,420ms (± 0.60%)1,415ms (± 0.25%)-5ms (- 0.35%)1,405ms1,423ms
Req 2 - geterr2,081ms (± 0.71%)2,087ms (± 0.71%)+6ms (+ 0.27%)2,051ms2,109ms
Req 3 - references203ms (± 0.98%)204ms (± 0.77%)+1ms (+ 0.69%)202ms210ms
Req 4 - navto169ms (± 0.97%)168ms (± 0.55%)-0ms (- 0.18%)166ms170ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo57ms (± 1.36%)56ms (± 1.04%)-1ms (- 2.11%)54ms57ms
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,881ms (± 0.41%)1,876ms (± 0.66%)-5ms (- 0.25%)1,846ms1,901ms
Req 2 - geterr696ms (± 0.63%)694ms (± 0.92%)-2ms (- 0.26%)680ms706ms
Req 3 - references66ms (± 0.68%)69ms (± 2.71%)+3ms (+ 5.17%)66ms76ms
Req 4 - navto199ms (± 0.44%)195ms (± 0.72%)-4ms (- 1.91%)192ms198ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo255ms (± 0.69%)252ms (± 1.16%)-4ms (- 1.37%)245ms260ms
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,480ms (± 0.67%)1,481ms (± 0.71%)+1ms (+ 0.06%)1,453ms1,504ms
Req 2 - geterr3,360ms (± 0.66%)3,314ms (± 0.87%)-47ms (- 1.38%)3,255ms3,394ms
Req 3 - references208ms (± 0.51%)211ms (± 0.99%)+3ms (+ 1.44%)207ms216ms
Req 4 - navto171ms (± 1.03%)171ms (± 0.75%)+0ms (+ 0.23%)168ms174ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo61ms (± 7.32%)59ms (± 5.22%)🟩-2ms (- 3.59%)56ms71ms
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,580ms (± 0.58%)1,580ms (± 0.51%)-0ms (- 0.03%)1,566ms1,600ms
Req 2 - geterr2,225ms (± 0.53%)2,236ms (± 0.61%)+11ms (+ 0.51%)2,211ms2,266ms
Req 3 - references223ms (± 1.62%)222ms (± 0.95%)-1ms (- 0.54%)218ms227ms
Req 4 - navto180ms (± 0.69%)180ms (± 0.62%)-1ms (- 0.28%)177ms182ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo59ms (± 3.31%)59ms (± 5.96%)-0ms (- 0.17%)56ms73ms
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,997ms (± 0.40%)2,009ms (± 0.62%)+12ms (+ 0.60%)1,986ms2,039ms
Req 2 - geterr741ms (± 0.55%)745ms (± 0.29%)+4ms (+ 0.59%)740ms750ms
Req 3 - references73ms (± 0.96%)71ms (± 1.69%)-2ms (- 2.87%)69ms74ms
Req 4 - navto215ms (± 1.10%)216ms (± 0.58%)+1ms (+ 0.51%)214ms220ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo280ms (± 1.41%)274ms (± 1.83%)-6ms (- 2.18%)268ms289ms
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-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)
BenchmarkNameIterations
Current5188010
Baselinemain10

Startup

Comparison Report - main..51880
Metricmain51880DeltaBestWorst
tsc-startup - node (v16.17.1, x64)
Execution time118.09ms (± 0.39%)121.29ms (± 0.57%)+3.20ms (+ 2.71%)116.95ms130.87ms
tsserver-startup - node (v16.17.1, x64)
Execution time197.55ms (± 0.29%)204.95ms (± 0.35%)+7.40ms (+ 3.75%)197.57ms211.77ms
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time192.19ms (± 0.31%)197.82ms (± 0.32%)+5.63ms (+ 2.93%)193.72ms206.88ms
typescript-startup - node (v16.17.1, x64)
Execution time177.63ms (± 0.32%)181.84ms (± 0.41%)+4.21ms (+ 2.37%)175.86ms193.60ms
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-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
Current5188010
Baselinemain10

Developer Information:

Download Benchmark

@rbuckton
Copy link
ContributorAuthor

material-ui doesn't seem to be reporting any perf results

@rbuckton
Copy link
ContributorAuthor

It seems we have a few unchecked casts toTransientSymbol that aren't sound, and we're just leveraging the fact that the resulting property access intoSymbolLinks just returnsundefined.

@jakebailey
Copy link
Member

If one of the results is zero, the compiler crashed somewhere. (I hit this back when I broke the parser but only in some cases.)

(We should make that more obvious, we just need to have it distinguish error codes somehow.)

@LoemChanndany
Copy link

In the same vein as#51682, this makesSymbol/TransientSymbol/MappedSymbol/ReverseMappedSymbol stable so that all symbol property access becomes monomorphic.

@rbuckton
Copy link
ContributorAuthor

If one of the results is zero, the compiler crashed somewhere. (I hit this back when I broke the parser but only in some cases.)

(We should make that more obvious, we just need to have it distinguish error codes somehow.)

Thats why I commented:

It seems we have a few unchecked casts toTransientSymbol

Even after I fixed the crash locally though I have a few failing tests for "infer from usage" code fixes that I have to run down.

@jakebailey
Copy link
Member

Ah, I thought it was just unrelated commentary on the PR, oops.

@rbuckton
Copy link
ContributorAuthor

Apparently, we also have unchecked casts toSymbolLinks fromSymbol, making them hard to find becauseSymbolLinks is just full of optional properties.

@rbuckton
Copy link
ContributorAuthor

@typescript-bot perf test

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 14, 2022
edited
Loading

Heya@rbuckton, I've started to run the perf test suite on this PR atd099445. You can monitor the buildhere.

Update:The results are in!

@typescript-bot
Copy link
Collaborator

@rbuckton
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - main..51880
Metricmain51880DeltaBestWorst
Angular - node (v18.10.0, x64)
Memory used364,536k (± 0.02%)374,543k (± 0.01%)+10,007k (+ 2.75%)374,426k374,631k
Parse Time1.57s (± 0.87%)1.56s (± 1.09%)-0.01s (- 0.77%)1.52s1.61s
Bind Time0.55s (± 0.73%)0.53s (± 0.75%)🟩-0.02s (- 3.63%)0.52s0.54s
Check Time3.91s (± 0.48%)3.72s (± 0.70%)🟩-0.19s (- 4.81%)3.68s3.78s
Emit Time3.92s (± 0.95%)3.81s (± 0.61%)-0.11s (- 2.81%)3.77s3.87s
Total Time9.94s (± 0.50%)9.62s (± 0.43%)🟩-0.33s (- 3.29%)9.56s9.73s
Compiler-Unions - node (v18.10.0, x64)
Memory used199,671k (± 1.06%)202,920k (± 1.07%)+3,249k (+ 1.63%)199,840k205,884k
Parse Time0.62s (± 0.93%)0.62s (± 0.77%)-0.01s (- 0.96%)0.61s0.63s
Bind Time0.35s (± 1.69%)0.35s (± 0.85%)-0.01s (- 1.97%)0.34s0.35s
Check Time4.98s (± 0.87%)4.70s (± 0.80%)🟩-0.28s (- 5.62%)4.62s4.76s
Emit Time1.48s (± 1.04%)1.44s (± 0.85%)-0.04s (- 2.37%)1.42s1.46s
Total Time7.44s (± 0.63%)7.10s (± 0.55%)🟩-0.33s (- 4.46%)7.01s7.16s
Monaco - node (v18.10.0, x64)
Memory used347,230k (± 0.01%)356,326k (± 0.02%)+9,095k (+ 2.62%)356,090k356,468k
Parse Time1.18s (± 0.95%)1.17s (± 0.78%)-0.01s (- 0.85%)1.15s1.19s
Bind Time0.52s (± 1.16%)0.49s (± 1.06%)🟩-0.02s (- 4.66%)0.48s0.50s
Check Time3.68s (± 0.40%)3.48s (± 0.51%)🟩-0.20s (- 5.41%)3.44s3.51s
Emit Time2.06s (± 0.74%)2.03s (± 0.79%)-0.03s (- 1.41%)2.00s2.07s
Total Time7.42s (± 0.28%)7.16s (± 0.56%)🟩-0.26s (- 3.49%)7.10s7.26s
TFS - node (v18.10.0, x64)
Memory used305,790k (± 0.25%)313,486k (± 0.23%)+7,696k (+ 2.52%)312,557k314,767k
Parse Time0.96s (± 1.43%)0.95s (± 0.89%)-0.01s (- 1.15%)0.93s0.96s
Bind Time0.54s (± 7.53%)0.51s (± 8.79%)🟩-0.03s (- 5.56%)0.44s0.58s
Check Time3.39s (± 0.59%)3.21s (± 0.43%)🟩-0.18s (- 5.25%)3.19s3.26s
Emit Time2.02s (± 0.76%)1.99s (± 0.62%)-0.03s (- 1.58%)1.96s2.01s
Total Time6.91s (± 0.53%)6.67s (± 0.57%)🟩-0.25s (- 3.57%)6.61s6.74s
material-ui - node (v18.10.0, x64)
Memory used451,744k (± 0.02%)485,697k (± 0.01%)+33,954k (+ 7.52%)485,622k485,814k
Parse Time1.38s (± 0.94%)1.37s (± 1.25%)-0.01s (- 1.08%)1.34s1.43s
Bind Time0.41s (± 0.82%)0.39s (± 0.88%)🟩-0.03s (- 6.30%)0.38s0.39s
Check Time10.20s (± 0.78%)9.54s (± 0.45%)🟩-0.65s (- 6.41%)9.42s9.63s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time12.00s (± 0.75%)11.30s (± 0.44%)🟩-0.69s (- 5.78%)11.16s11.39s
xstate - node (v18.10.0, x64)
Memory used553,529k (± 0.01%)569,745k (± 0.01%)+16,217k (+ 2.93%)569,638k569,855k
Parse Time1.92s (± 0.59%)1.90s (± 0.36%)-0.03s (- 1.35%)1.88s1.91s
Bind Time0.72s (± 1.66%)0.69s (± 2.20%)🟩-0.03s (- 4.44%)0.66s0.73s
Check Time1.03s (± 0.97%)0.99s (± 0.71%)🟩-0.04s (- 3.51%)0.98s1.01s
Emit Time0.05s (± 0.00%)0.05s (± 0.00%)0.00s ( 0.00%)0.05s0.05s
Total Time3.73s (± 0.50%)3.63s (± 0.43%)-0.09s (- 2.47%)3.61s3.67s
Angular - node (v16.17.1, x64)
Memory used363,888k (± 0.02%)373,807k (± 0.01%)+9,919k (+ 2.73%)373,650k373,858k
Parse Time1.93s (± 0.39%)1.90s (± 0.50%)-0.03s (- 1.61%)1.88s1.92s
Bind Time0.67s (± 0.77%)0.64s (± 0.73%)🟩-0.03s (- 4.62%)0.63s0.65s
Check Time5.03s (± 0.62%)4.81s (± 0.89%)🟩-0.22s (- 4.47%)4.70s4.88s
Emit Time4.71s (± 0.83%)4.55s (± 0.90%)🟩-0.16s (- 3.48%)4.47s4.62s
Total Time12.33s (± 0.52%)11.89s (± 0.45%)🟩-0.45s (- 3.62%)11.79s12.03s
Compiler-Unions - node (v16.17.1, x64)
Memory used200,231k (± 0.63%)203,082k (± 0.61%)+2,851k (+ 1.42%)201,594k205,313k
Parse Time0.80s (± 0.83%)0.79s (± 0.82%)-0.01s (- 1.37%)0.78s0.81s
Bind Time0.45s (± 0.82%)0.43s (± 0.79%)-0.01s (- 2.91%)0.43s0.44s
Check Time5.92s (± 0.58%)5.62s (± 0.75%)🟩-0.31s (- 5.23%)5.51s5.71s
Emit Time1.80s (± 0.95%)1.78s (± 0.92%)-0.02s (- 1.28%)1.73s1.81s
Total Time8.98s (± 0.46%)8.62s (± 0.61%)🟩-0.36s (- 4.01%)8.48s8.73s
Monaco - node (v16.17.1, x64)
Memory used346,594k (± 0.01%)355,651k (± 0.02%)+9,057k (+ 2.61%)355,509k355,777k
Parse Time1.43s (± 0.93%)1.43s (± 0.77%)-0.01s (- 0.42%)1.40s1.45s
Bind Time0.61s (± 0.66%)0.59s (± 0.62%)-0.01s (- 2.30%)0.59s0.60s
Check Time4.64s (± 0.60%)4.39s (± 0.78%)🟩-0.25s (- 5.41%)4.32s4.47s
Emit Time2.48s (± 0.82%)2.44s (± 1.01%)-0.04s (- 1.57%)2.40s2.50s
Total Time9.16s (± 0.52%)8.85s (± 0.71%)🟩-0.31s (- 3.39%)8.75s9.00s
TFS - node (v16.17.1, x64)
Memory used304,277k (± 0.02%)312,125k (± 0.03%)+7,849k (+ 2.58%)312,057k312,439k
Parse Time1.19s (± 1.08%)1.17s (± 1.65%)-0.02s (- 1.43%)1.14s1.23s
Bind Time0.58s (± 0.90%)0.57s (± 1.28%)-0.01s (- 1.90%)0.55s0.58s
Check Time4.33s (± 0.45%)4.11s (± 0.41%)🟩-0.22s (- 5.10%)4.07s4.15s
Emit Time2.49s (± 1.42%)2.47s (± 0.90%)-0.02s (- 0.96%)2.42s2.51s
Total Time8.60s (± 0.57%)8.32s (± 0.51%)🟩-0.27s (- 3.20%)8.23s8.43s
material-ui - node (v16.17.1, x64)
Memory used451,155k (± 0.02%)484,996k (± 0.01%)+33,841k (+ 7.50%)484,955k485,087k
Parse Time1.68s (± 0.59%)1.66s (± 0.56%)-0.02s (- 1.31%)1.64s1.67s
Bind Time0.50s (± 0.68%)0.48s (± 0.71%)🟩-0.03s (- 5.17%)0.47s0.48s
Check Time11.59s (± 0.63%)10.98s (± 0.66%)🟩-0.60s (- 5.18%)10.89s11.23s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time13.77s (± 0.50%)13.12s (± 0.59%)🟩-0.65s (- 4.72%)13.03s13.38s
xstate - node (v16.17.1, x64)
Memory used551,127k (± 0.01%)567,387k (± 0.01%)+16,260k (+ 2.95%)567,268k567,564k
Parse Time2.31s (± 0.28%)2.29s (± 0.53%)-0.02s (- 0.78%)2.28s2.34s
Bind Time0.85s (± 2.72%)0.83s (± 2.19%)-0.02s (- 2.24%)0.79s0.87s
Check Time1.35s (± 0.69%)1.31s (± 0.57%)-0.03s (- 2.60%)1.30s1.33s
Emit Time0.06s (± 0.00%)0.06s (± 0.00%)0.00s ( 0.00%)0.06s0.06s
Total Time4.57s (± 0.52%)4.51s (± 0.55%)-0.07s (- 1.44%)4.45s4.55s
Angular - node (v14.15.1, x64)
Memory used357,638k (± 0.01%)367,560k (± 0.00%)+9,922k (+ 2.77%)367,530k367,582k
Parse Time2.05s (± 0.41%)2.03s (± 0.29%)-0.02s (- 0.78%)2.02s2.04s
Bind Time0.71s (± 0.70%)0.69s (± 0.32%)🟩-0.02s (- 3.36%)0.69s0.70s
Check Time5.36s (± 0.55%)5.13s (± 0.45%)🟩-0.22s (- 4.16%)5.07s5.17s
Emit Time4.82s (± 0.96%)4.68s (± 0.62%)-0.14s (- 2.82%)4.63s4.76s
Total Time12.94s (± 0.43%)12.54s (± 0.41%)🟩-0.40s (- 3.08%)12.43s12.67s
Compiler-Unions - node (v14.15.1, x64)
Memory used196,259k (± 0.52%)199,142k (± 0.57%)+2,883k (+ 1.47%)196,787k200,283k
Parse Time0.91s (± 0.80%)0.90s (± 0.50%)-0.01s (- 1.10%)0.89s0.91s
Bind Time0.48s (± 0.76%)0.47s (± 0.78%)-0.01s (- 2.10%)0.46s0.47s
Check Time6.15s (± 0.48%)5.87s (± 0.55%)🟩-0.28s (- 4.57%)5.79s5.96s
Emit Time1.92s (± 0.60%)1.89s (± 1.11%)-0.04s (- 1.92%)1.86s1.94s
Total Time9.46s (± 0.28%)9.12s (± 0.37%)🟩-0.34s (- 3.60%)9.03s9.20s
Monaco - node (v14.15.1, x64)
Memory used341,571k (± 0.01%)350,687k (± 0.01%)+9,117k (+ 2.67%)350,613k350,779k
Parse Time1.58s (± 0.48%)1.57s (± 0.59%)-0.02s (- 1.01%)1.55s1.59s
Bind Time0.65s (± 0.72%)0.63s (± 0.88%)-0.02s (- 2.77%)0.62s0.65s
Check Time4.94s (± 0.44%)4.68s (± 0.69%)🟩-0.26s (- 5.28%)4.61s4.75s
Emit Time2.59s (± 1.01%)2.57s (± 0.84%)-0.02s (- 0.89%)2.52s2.62s
Total Time9.76s (± 0.42%)9.45s (± 0.43%)🟩-0.31s (- 3.22%)9.39s9.55s
TFS - node (v14.15.1, x64)
Memory used301,370k (± 0.00%)309,172k (± 0.01%)+7,802k (+ 2.59%)309,116k309,213k
Parse Time1.33s (± 0.94%)1.32s (± 0.98%)-0.01s (- 0.68%)1.29s1.35s
Bind Time0.60s (± 0.60%)0.59s (± 0.61%)-0.01s (- 1.66%)0.59s0.60s
Check Time4.61s (± 0.48%)4.35s (± 0.53%)🟩-0.26s (- 5.64%)4.29s4.40s
Emit Time2.77s (± 0.63%)2.74s (± 0.33%)-0.03s (- 1.26%)2.72s2.75s
Total Time9.31s (± 0.41%)9.00s (± 0.32%)🟩-0.31s (- 3.37%)8.93s9.05s
material-ui - node (v14.15.1, x64)
Memory used446,780k (± 0.01%)480,418k (± 0.01%)+33,638k (+ 7.53%)480,327k480,483k
Parse Time1.88s (± 0.55%)1.87s (± 0.60%)-0.01s (- 0.69%)1.84s1.90s
Bind Time0.54s (± 1.07%)0.52s (± 0.43%)🟩-0.02s (- 4.05%)0.52s0.53s
Check Time11.98s (± 0.62%)11.47s (± 0.50%)🟩-0.51s (- 4.27%)11.34s11.61s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time14.41s (± 0.51%)13.86s (± 0.46%)🟩-0.54s (- 3.76%)13.73s14.03s
xstate - node (v14.15.1, x64)
Memory used539,770k (± 0.01%)555,920k (± 0.01%)+16,150k (+ 2.99%)555,722k556,084k
Parse Time2.64s (± 0.56%)2.62s (± 0.56%)-0.02s (- 0.83%)2.60s2.67s
Bind Time0.82s (± 0.41%)0.78s (± 0.29%)🟩-0.04s (- 5.10%)0.78s0.79s
Check Time1.44s (± 0.70%)1.43s (± 0.62%)-0.02s (- 1.18%)1.40s1.44s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time4.99s (± 0.38%)4.91s (± 0.35%)-0.08s (- 1.62%)4.88s4.95s
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-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)
BenchmarkNameIterations
Current5188010
Baselinemain10

TSServer

Comparison Report - main..51880
Metricmain51880DeltaBestWorst
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,073ms (± 0.72%)1,063ms (± 0.79%)-10ms (- 0.94%)1,046ms1,090ms
Req 2 - geterr2,592ms (± 0.79%)2,511ms (± 0.72%)🟩-81ms (- 3.12%)2,490ms2,566ms
Req 3 - references167ms (± 0.85%)164ms (± 1.08%)-2ms (- 1.44%)161ms170ms
Req 4 - navto144ms (± 1.24%)142ms (± 1.41%)-3ms (- 1.94%)139ms148ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo56ms (± 7.73%)55ms (± 7.97%)-1ms (- 2.15%)48ms62ms
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,148ms (± 0.69%)1,136ms (± 0.39%)-12ms (- 1.04%)1,128ms1,147ms
Req 2 - geterr1,575ms (± 0.64%)1,561ms (± 0.59%)-14ms (- 0.87%)1,546ms1,585ms
Req 3 - references175ms (± 0.95%)172ms (± 0.93%)-3ms (- 1.94%)169ms176ms
Req 4 - navto153ms (± 0.67%)152ms (± 0.63%)-2ms (- 1.05%)149ms153ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo53ms (± 1.71%)52ms (± 1.11%)-1ms (- 1.51%)51ms54ms
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,554ms (± 1.08%)1,545ms (± 1.05%)-8ms (- 0.53%)1,517ms1,591ms
Req 2 - geterr548ms (± 1.33%)544ms (± 1.31%)-3ms (- 0.57%)532ms561ms
Req 3 - references57ms (± 1.68%)58ms (± 2.92%)+1ms (+ 2.47%)54ms62ms
Req 4 - navto196ms (± 1.20%)193ms (± 0.62%)-3ms (- 1.63%)190ms196ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo219ms (± 1.08%)211ms (± 1.23%)🟩-8ms (- 3.52%)205ms217ms
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,334ms (± 0.52%)1,320ms (± 0.38%)-14ms (- 1.02%)1,309ms1,329ms
Req 2 - geterr3,186ms (± 0.45%)3,096ms (± 0.86%)-90ms (- 2.83%)3,057ms3,163ms
Req 3 - references196ms (± 0.54%)192ms (± 0.82%)-4ms (- 1.94%)190ms197ms
Req 4 - navto156ms (± 1.23%)155ms (± 0.90%)-1ms (- 0.64%)152ms158ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo58ms (± 2.08%)57ms (± 1.66%)-0ms (- 0.52%)56ms60ms
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,421ms (± 0.76%)1,402ms (± 0.59%)-19ms (- 1.35%)1,384ms1,424ms
Req 2 - geterr2,074ms (± 0.73%)2,072ms (± 0.60%)-2ms (- 0.08%)2,060ms2,121ms
Req 3 - references203ms (± 0.28%)200ms (± 0.40%)-3ms (- 1.58%)198ms202ms
Req 4 - navto167ms (± 0.90%)166ms (± 1.02%)-1ms (- 0.42%)163ms171ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo57ms (± 0.84%)56ms (± 1.07%)-1ms (- 1.94%)55ms57ms
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,871ms (± 0.82%)1,845ms (± 0.44%)-26ms (- 1.41%)1,827ms1,867ms
Req 2 - geterr698ms (± 0.59%)686ms (± 0.79%)-12ms (- 1.69%)674ms703ms
Req 3 - references67ms (± 1.44%)67ms (± 1.77%)+0ms (+ 0.45%)65ms70ms
Req 4 - navto197ms (± 0.77%)191ms (± 1.19%)🟩-6ms (- 3.20%)186ms197ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo258ms (± 0.84%)254ms (± 1.31%)-4ms (- 1.51%)247ms263ms
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,478ms (± 0.74%)1,474ms (± 0.66%)-4ms (- 0.25%)1,453ms1,501ms
Req 2 - geterr3,379ms (± 0.83%)3,286ms (± 0.48%)-93ms (- 2.76%)3,257ms3,329ms
Req 3 - references210ms (± 0.68%)207ms (± 0.64%)-3ms (- 1.19%)205ms211ms
Req 4 - navto171ms (± 1.05%)169ms (± 0.87%)-2ms (- 1.28%)167ms174ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo59ms (± 0.99%)58ms (± 1.44%)-1ms (- 1.87%)56ms60ms
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,583ms (± 0.48%)1,569ms (± 0.27%)-14ms (- 0.88%)1,556ms1,577ms
Req 2 - geterr2,231ms (± 0.55%)2,230ms (± 0.49%)-1ms (- 0.04%)2,212ms2,265ms
Req 3 - references222ms (± 0.95%)220ms (± 1.16%)-2ms (- 0.77%)216ms224ms
Req 4 - navto179ms (± 0.85%)178ms (± 0.93%)-1ms (- 0.61%)173ms182ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo61ms (± 3.43%)58ms (± 1.98%)🟩-3ms (- 4.27%)56ms61ms
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen2,013ms (± 0.88%)1,994ms (± 0.72%)-19ms (- 0.95%)1,971ms2,034ms
Req 2 - geterr744ms (± 0.54%)744ms (± 0.42%)-0ms (- 0.04%)738ms753ms
Req 3 - references71ms (± 1.33%)74ms (± 0.83%)+3ms (+ 3.78%)73ms76ms
Req 4 - navto218ms (± 0.80%)215ms (± 0.68%)-4ms (- 1.60%)210ms217ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo274ms (± 0.47%)284ms (± 1.01%)+10ms (+ 3.65%)277ms291ms
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-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)
BenchmarkNameIterations
Current5188010
Baselinemain10

Startup

Comparison Report - main..51880
Metricmain51880DeltaBestWorst
tsc-startup - node (v16.17.1, x64)
Execution time118.28ms (± 0.38%)119.87ms (± 0.57%)+1.58ms (+ 1.34%)116.44ms129.77ms
tsserver-startup - node (v16.17.1, x64)
Execution time198.89ms (± 0.29%)199.87ms (± 0.42%)+0.98ms (+ 0.49%)195.43ms208.11ms
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time193.07ms (± 0.28%)194.64ms (± 0.43%)+1.57ms (+ 0.81%)189.91ms202.46ms
typescript-startup - node (v16.17.1, x64)
Execution time178.55ms (± 0.32%)179.63ms (± 0.43%)+1.08ms (+ 0.60%)175.76ms190.01ms
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-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
Current5188010
Baselinemain10

Developer Information:

Download Benchmark

jakebailey reacted with hooray emojiandrewbranch reacted with heart emoji

@rbucktonrbuckton marked this pull request as ready for reviewDecember 14, 2022 17:38
/** @internal */ assignmentDeclarationMembers?: Map<number, Declaration>; // detected late-bound assignment declarations associated with the symbol
}

/** @internal */
export interface SymbolLinks {
_symbolLinksBrand: any;
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I added this primarily to catch an unconditional cast toSymbolLinks fromSymbol and decided to leave it in to prevent that from happening in the future.

@@ -1302,8 +1303,9 @@ const intrinsicTypeKinds: ReadonlyMap<string, IntrinsicTypeKind> = new Map(getEn
Uncapitalize: IntrinsicTypeKind.Uncapitalize
}));

function SymbolLinks(this: SymbolLinks) {
}
const SymbolLinks = class implements SymbolLinks {
Copy link
Member

Choose a reason for hiding this comment

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

Does using a class mean instances of SymbolLinks will share the same hidden class even if different properties are attached in different orders? If not, how bad is the memory impact of initializing all the possible properties toundefined? (I assume awful because there are so many.) Did you test the class implementation against an object literal implementation?

Copy link
Member

Choose a reason for hiding this comment

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

Also, what’s the reason for using a class expression here?

Copy link
ContributorAuthor

@rbucktonrbucktonDec 14, 2022
edited
Loading

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I wonder how many more of those kinds of things we have that could be switched.

(Those links don't seem to work, but the example is enough to convince me, personally.)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

They don't work because checker isn't expanded by default, you have to expand it manually.

image

Copy link
Member

Choose a reason for hiding this comment

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

I didn’t realize we were using a constructor function before. The crux of my question is really, is there a reason why it’s notfunction createSymbolLinks(): SymbolLinks { return {}; }, and do we know what the difference in performance characteristics between the two is.

Copy link
ContributorAuthor

@rbucktonrbucktonDec 14, 2022
edited
Loading

Choose a reason for hiding this comment

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

Does using a class mean instances of SymbolLinks will share the same hidden class even if different properties are attached in different orders?

No, whether you are using aclass orfunction has no bearing at the moment because the actual emit fromesbuild is a class with no fields. Native classes with native fieldswould ensure all properties are defined ahead of time, which would help but we can't leverage that currently.

If not, how bad is the memory impact of initializing all the possible properties toundefined? (I assume awful because there are so many.)

You're essentially adding the space for a heap pointer (roughly 8 bytes) for each property, per object. The best way to reduce that cost is to cut back on what we actually need to store on the object, either through the introduction of bitflags to condensebooleans, putting lesser used properties in their own objects, or not storing anything that can be trivially recomputed.

Did you test the class implementation against an object literal implementation?

Not for this specifically, but in general I have yes. There's no real difference in storage, but object literals are far harder to isolate when looking at memory snapshots or v8 traces since they all haveObject as their constructor.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

(roughly 8 bytes) for each property

This isn't entirely accurate. IIRC, every object in V8 has an initial structure that is fixed in size and can hold a small number of properties directly. Additional properties beyond that limit are stored elsewhere on the heap. This means every object allocation has a minimum size that accounts for some of the properties.

Copy link
ContributorAuthor

@rbucktonrbucktonDec 14, 2022
edited
Loading

Choose a reason for hiding this comment

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

I didn’t realize we were using a constructor function before. The crux of my question is really, is there a reason why it’s notfunction createSymbolLinks(): SymbolLinks { return {}; }, and do we know what the difference in performance characteristics between the two is.

All object literals share the same constructor so they show up asObject in the debugger, in memory snapshots, and in the v8 trace logs, which make them impossible to differentiate from one another. We should really try to use object literals only for throw-away things like options bags for functions, or destructuring results. Using a class for objects with a longer lifetime is preferred, even if we're just using it as a tag, i.e.:

functioncreateFlowNode(){return{}asFlowNode;// bad for debugging/snapshots/tracing}// vsfunctioncreateFlowNode(){returnnewFlowNode()asFlowNode;// better for debugging/snapshots/tracing,// but pretty much the same as {} otherwise}// minimum needed to tag the object for diagnostic tooling, though it would be better// if the object has a stable set of properties we can pre-allocate:constFlowNode=classFlowNode{};

The only downside to this approach is that you end up with a unique starting "map" for each tag (since it points to a different constructor/prototype)

IDisposable reacted with heart emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

For example, there are 215 different V8 maps for Object here that I have no insight into without drilling into each one, vs the other constructors in this list:

image

ExE-Boss reacted with thumbs up emoji
@jakebailey
Copy link
Member

Partially related, but the force pushing is making it a little hard to view the changes as they come in; since we squash on merge, is the force pushing required for all of the updates?

@rbuckton
Copy link
ContributorAuthor

rbuckton commentedDec 14, 2022
edited
Loading

Partially related, but the force pushing is making it a little hard to view the changes as they come in; since we squash on merge, is the force pushing required for all of the updates?

Maybe not, but I generally try to keep related changes isolated to a single commit, and rebase againstmain when possible because it makes it easier to walk around through local commit history if I am working on a feature requiring multiple independent changes. This is especially the case with these perf related PRs because I'm often walking back and forth through local commit history to compare v8 trace logs looking for specific differences.

@jakebailey
Copy link
Member

@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 commentedDec 14, 2022
edited
Loading

Heya@jakebailey, I've started to run the diff-based top-repos suite on this PR atd7cbf19. You can monitor the buildhere.

Update:The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 14, 2022
edited
Loading

Heya@jakebailey, I've started to run the diff-based user code test suite on this PR atd7cbf19. You can monitor the buildhere.

Update:The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 14, 2022
edited
Loading

Heya@jakebailey, I've started to run the diff-based top-repos suite (tsserver) on this PR atd7cbf19. You can monitor the buildhere.

Update:The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 14, 2022
edited
Loading

Heya@jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR atd7cbf19. You can monitor the buildhere.

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 14, 2022
edited
Loading

Heya@jakebailey, I've started to run the extended test suite on this PR atd7cbf19. You can monitor the buildhere.

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 14, 2022
edited
Loading

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

Update:The results are in!

Copy link
Member

@jakebaileyjakebailey left a comment

Choose a reason for hiding this comment

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

The code looks good to me, but I ran all of the different suites in case there's another crash lurking.

Comment on lines -349 to +350
HasDecorators,
hasDecorators,
HasDecorators,
Copy link
Member

Choose a reason for hiding this comment

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

Is some tool doing this? If this is changed, is it likely for this to get flipped back again?

(I am hoping this is moot as of tomorrow-ish, when the next VS Code TS nightly is available with the fix in, and or when we can restore the ordering to be sensitive on main.)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I did "Sort lines ascending" because auto-imports stuck a few things at the bottom, and organize imports wouldn't fix it.

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user test suite comparingmain andrefs/pull/51880/merge:

Everything looks good!

1 similar comment
@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user test suite comparingmain andrefs/pull/51880/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top-repos suite comparingmain andrefs/pull/51880/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top-repos suite comparingmain andrefs/pull/51880/merge:

Something interesting changed - please have a look.

Details

felixrieseberg/windows95

⚠️ Note that built also had errors⚠️
Req #1149 - references    at formatMessage2 (/typescript-main/built/local/tsserver.js:159184:21)    at IOSession.writeMessage (/typescript-main/built/local/tsserver.js:160191:21)    at IOSession.send (/typescript-main/built/local/tsserver.js:160188:10)    at IOSession.doOutput (/typescript-main/built/local/tsserver.js:160235:10)    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:161846:14)    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:163232:14)
Req #1149 - references    at formatMessage2 (/typescript-51880/built/local/tsserver.js:159200:21)    at IOSession.writeMessage (/typescript-51880/built/local/tsserver.js:160207:21)    at IOSession.send (/typescript-51880/built/local/tsserver.js:160204:10)    at IOSession.doOutput (/typescript-51880/built/local/tsserver.js:160251:10)    at IOSession.onMessage (/typescript-51880/built/local/tsserver.js:161862:14)    at Interface.<anonymous> (/typescript-51880/built/local/tsserver.js:163248:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults4/felixrieseberg.windows95.rawError.txt in theartifact folder

Last few requests

{"seq":1146,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/src/renderer/lib/_libwabt.js","line":13,"offset":351847,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":1}}{"seq":1147,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/src/renderer/lib/_libwabt.js","line":13,"offset":351847,"entryNames":["_"]}}{"seq":1148,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/src/renderer/lib/_libwabt.js","line":13,"offset":352407}}{"seq":1149,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/src/renderer/lib/_libwabt.js","line":13,"offset":352852}}

Repro Steps

  1. git clone https://github.com/felixrieseberg/windows95 --recurse-submodules
  2. In dirwindows95, rungit reset --hard 17a81393467e2668eb2eea291ab4b6a749756dad
  3. In dirwindows95, runyarn install --ignore-engines --ignore-scripts --silent
  4. Back in the initial folder, downloadRepoResults4/felixrieseberg.windows95.replay.txt from theartifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./windows95 ./felixrieseberg.windows95.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

palantir/blueprint

⚠️ Note that built also had errors⚠️
Req #16168 - references    at formatMessage2 (/typescript-main/built/local/tsserver.js:159184:21)    at IOSession.writeMessage (/typescript-main/built/local/tsserver.js:160191:21)    at IOSession.send (/typescript-main/built/local/tsserver.js:160188:10)    at IOSession.doOutput (/typescript-main/built/local/tsserver.js:160235:10)    at IOSession.onMessage (/typescript-main/built/local/tsserver.js:161846:14)    at Interface.<anonymous> (/typescript-main/built/local/tsserver.js:163232:14)
Req #16168 - references    at formatMessage2 (/typescript-51880/built/local/tsserver.js:159200:21)    at IOSession.writeMessage (/typescript-51880/built/local/tsserver.js:160207:21)    at IOSession.send (/typescript-51880/built/local/tsserver.js:160204:10)    at IOSession.doOutput (/typescript-51880/built/local/tsserver.js:160251:10)    at IOSession.onMessage (/typescript-51880/built/local/tsserver.js:161862:14)    at Interface.<anonymous> (/typescript-51880/built/local/tsserver.js:163248:14)

That is a filtered view of the text. To see the raw error text, go to RepoResults4/palantir.blueprint.rawError.txt in theartifact folder

Last few requests

{"seq":16165,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/1/docs-app.js","line":1,"offset":2095038,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":1}}{"seq":16166,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/1/docs-app.js","line":1,"offset":2095038,"entryNames":["arguments"]}}{"seq":16167,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/1/docs-app.js","line":1,"offset":2096623,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":1}}{"seq":16168,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/1/docs-app.js","line":1,"offset":2096978}}

Repro Steps

  1. git clone https://github.com/palantir/blueprint --recurse-submodules
  2. In dirblueprint, rungit reset --hard b6c1518ea2f524accfba8045ce6f22cac7c5b56e
  3. In dirblueprint, runyarn install --ignore-engines --ignore-scripts --silent
  4. Back in the initial folder, downloadRepoResults4/palantir.blueprint.replay.txt from theartifact folder
  5. npm install --no-save @typescript/server-replay
  6. npx tsreplay ./blueprint ./palantir.blueprint.replay.txt path/to/tsserver.js
  7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc

@jakebailey
Copy link
Member

Those ones are all broken on main too, so nothing new there.

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

@andrewbranchandrewbranchandrewbranch approved these changes

@jakebaileyjakebaileyjakebailey approved these changes

@ahejlsbergahejlsbergAwaiting requested review from ahejlsberg

Assignees

@rbucktonrbuckton

Labels
Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@rbuckton@typescript-bot@jakebailey@LoemChanndany@andrewbranch

[8]ページ先頭

©2009-2025 Movatter.jp