Repository navigation
Commit 1807ffa
committed
Share complete union and intersection property cache entries
Complete non-augmented properties are valid for augmented lookup, but
copying each result into both caches retains duplicate name tables.
MUI keeps 2,734,919 identical entries this way, nearly doubling its
union/intersection cache storage without adding semantic information.
Preserve independent augmented results and partial-property behavior
while sharing complete entries. A failed lookup needs no empty table.
The MUI census falls from 230242 tables and 5628201 entries to 116635
tables and 2893282 entries; all distinct cached identities remain.
Six fresh-process interleaved single-checker comparisons against the
parent commit, with ordinary GC, save 135.63 MiB of retained MUI heap
(-8.15%) and 132.00 MiB of GC scanning (-9.22%). Total allocated bytes
fall 4.45% and allocation events fall 1.46%. VS Code's corresponding
reductions are small: retained -0.15%, scan -0.17%, allocated -0.16%.
Instruction differences in these single-checker comparisons are
inconclusive; elapsed time is noisy on the shared machine.
Six default-threaded production CLI pairs confirm MUI's reported heap
falls 9.29% and instructions fall 2.60%. VS Code and Webpack have small
heap reductions and inconclusive instruction differences. These are
incremental savings on top of the earlier branch optimizations.
CLI-reported heap is not the forced-GC retained-heap measure above.
MUI uses the CI-pinned source and restored scenario dependencies at
6780195595c12252a130aa5ae5c5bd461229c6b7. VS Code uses
8bf178e1e1c2be3723f14683f7b1e5fdb3f780e4. Webpack uses an isolated
2289141381f2c1c965cb65118fa0ffe2e9e19834 with restored dependencies.
Production diagnostics and all semantic counts match exactly.
Tests cover both query orders, both composite kinds, cache growth and
GC reachability, missing entries, read/write partial flags, differing
mode-specific identities, and real function-property augmentation.
The storage regressions fail before this change.
Single-checker retained heap and allocation measurements:
│ mui-shared-union-before.txt │ mui-shared-union-shared.txt │
│ retained-B │ retained-B vs base │
ExternalMemory-20 1.624Gi ± 0% 1.492Gi ± 0% -8.15% (p=0.002 n=6)
│ mui-shared-union-before.txt │ mui-shared-union-shared.txt │
│ scan-B │ scan-B vs base │
ExternalMemory-20 1.398Gi ± 0% 1.270Gi ± 0% -9.22% (p=0.002 n=6)
│ mui-shared-union-before.txt │ mui-shared-union-shared.txt │
│ B/op │ B/op vs base │
ExternalMemory-20 5.364Gi ± 0% 5.125Gi ± 0% -4.45% (p=0.002 n=6)
│ mui-shared-union-before.txt │ mui-shared-union-shared.txt │
│ allocs/op │ allocs/op vs base │
ExternalMemory-20 25.17M ± 0% 24.80M ± 1% -1.46% (p=0.002 n=6)
│ vscode-shared-union-before.txt │ vscode-shared-union-shared.txt │
│ retained-B │ retained-B vs base │
ExternalMemory-20 2.619Gi ± 0% 2.615Gi ± 0% -0.15% (p=0.002 n=6)
│ vscode-shared-union-before.txt │ vscode-shared-union-shared.txt │
│ scan-B │ scan-B vs base │
ExternalMemory-20 2.291Gi ± 0% 2.287Gi ± 0% -0.17% (p=0.002 n=6)
│ vscode-shared-union-before.txt │ vscode-shared-union-shared.txt │
│ B/op │ B/op vs base │
ExternalMemory-20 3.754Gi ± 0% 3.748Gi ± 0% -0.16% (p=0.002 n=6)
│ vscode-shared-union-before.txt │ vscode-shared-union-shared.txt │
│ allocs/op │ allocs/op vs base │
ExternalMemory-20 23.61M ± 0% 23.59M ± 0% -0.08% (p=0.002 n=6)
Single-checker instructions:
│ mui-shared-union-before.instructions │ mui-shared-union-shared.instructions │
│ instructions/op │ instructions/op vs base │
ExternalInstructions-20 218.9G ± 3% 217.3G ± 2% ~ (p=0.310 n=6)
│ vscode-shared-union-before.instructions │ vscode-shared-union-shared.instructions │
│ instructions/op │ instructions/op vs base │
ExternalInstructions-20 188.8G ± 3% 192.1G ± 2% ~ (p=0.394 n=6)
Default-threaded production CLI:
│ shared-union-cli-before.txt │ shared-union-cli-after.txt │
│ instructions/op │ instructions/op vs base │
mui-20 283.3G ± 1% 275.9G ± 2% -2.60% (p=0.015 n=6)
vscode-20 308.2G ± 7% 293.0G ± 6% ~ (p=0.818 n=6)
webpack-20 51.96G ± 5% 51.82G ± 4% ~ (p=1.000 n=6)
geomean 165.6G 161.2G -2.62%
│ shared-union-cli-before.txt │ shared-union-cli-after.txt │
│ heap-B/op │ heap-B/op vs base │
mui-20 2.059Gi ± 0% 1.868Gi ± 0% -9.29% (p=0.002 n=6)
vscode-20 2.835Gi ± 0% 2.829Gi ± 0% -0.21% (p=0.004 n=6)
webpack-20 666.9Mi ± 0% 663.0Mi ± 0% -0.57% (p=0.002 n=6)
geomean 1.561Gi 1.507Gi -3.45%
│ shared-union-cli-before.txt │ shared-union-cli-after.txt │
│ allocs/op │ allocs/op vs base │
mui-20 29.84M ± 0% 29.55M ± 0% -0.97% (p=0.002 n=6)
vscode-20 36.67M ± 2% 36.64M ± 0% ~ (p=0.132 n=6)
webpack-20 6.235M ± 2% 6.208M ± 0% -0.43% (p=0.002 n=6)
geomean 18.97M 18.87M -0.49%
│ shared-union-cli-before.txt │ shared-union-cli-after.txt │
│ check-sec/op │ check-sec/op vs base │
mui-20 8.986 ± 6% 8.559 ± 4% -4.75% (p=0.026 n=6)
vscode-20 8.345 ± 4% 8.900 ± 10% ~ (p=0.132 n=6)
webpack-20 1.851 ± 8% 1.818 ± 8% ~ (p=0.310 n=6)
geomean 5.178 5.173 -0.08%1 parent 46ffb18 commit 1807ffa
4 files changed
Lines changed: 148 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21895 | 21895 | | |
21896 | 21896 | | |
21897 | 21897 | | |
21898 | | - | |
| 21898 | + | |
21899 | 21899 | | |
21900 | | - | |
| 21900 | + | |
| 21901 | + | |
| 21902 | + | |
21901 | 21903 | | |
21902 | | - | |
21903 | | - | |
21904 | | - | |
21905 | | - | |
| 21904 | + | |
| 21905 | + | |
| 21906 | + | |
| 21907 | + | |
| 21908 | + | |
| 21909 | + | |
| 21910 | + | |
| 21911 | + | |
| 21912 | + | |
| 21913 | + | |
21906 | 21914 | | |
21907 | 21915 | | |
21908 | 21916 | | |
21909 | | - | |
21910 | | - | |
21911 | | - | |
21912 | | - | |
21913 | | - | |
21914 | | - | |
| 21917 | + | |
| 21918 | + | |
| 21919 | + | |
| 21920 | + | |
| 21921 | + | |
| 21922 | + | |
| 21923 | + | |
21915 | 21924 | | |
| 21925 | + | |
| 21926 | + | |
21916 | 21927 | | |
21917 | 21928 | | |
21918 | 21929 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
120 | 166 | | |
121 | 167 | | |
122 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1464 | 1464 | | |
1465 | 1465 | | |
1466 | 1466 | | |
1467 | | - | |
| 1467 | + | |
1468 | 1468 | | |
1469 | 1469 | | |
1470 | 1470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
550 | 628 | | |
551 | 629 | | |
552 | 630 | | |
| |||
0 commit comments