Repository navigation
Commit d7c8ce4
committed
Skip unrelated assignments when narrowing property accesses
Narrowing a property access like x.y walks the same long assignment
chains as narrowing an identifier, and was still visiting the syntax
of every assignment on the way. Such a reference can only be affected
by assignments to x itself or to access chains rooted at x.
Record the root identifier of access chain assignment targets as well,
marked so that identifier references still ignore them, and let walks
for access chains rooted at an identifier skip assignments rooted at
any other name.
--checkers 4, n=6:
│ before │ after │
│ sec/op │ sec/op vs base │
Tsc/bluesky 2.750 ± 6% 2.814 ± 4% ~ (p=0.084 n=6)
Tsc/sentry 11.28 ± 2% 11.34 ± 2% ~ (p=0.818 n=6)
Tsc/t3code-server 12.19 ± 9% 11.01 ± 4% -9.71% (p=0.002 n=6)
Tsc/vscode 12.93 ± 5% 12.90 ± 1% ~ (p=0.589 n=6)
geomean 8.363 8.203 -1.91%
│ before │ after │
│ rss-B │ rss-B vs base │
Tsc/bluesky 1.197Gi ± 2% 1.200Gi ± 2% ~ (p=0.818 n=6)
Tsc/sentry 3.527Gi ± 5% 3.512Gi ± 5% ~ (p=0.937 n=6)
Tsc/t3code-server 2.859Gi ± 3% 2.840Gi ± 2% ~ (p=0.818 n=6)
Tsc/vscode 4.826Gi ± 3% 4.969Gi ± 3% +2.96% (p=0.026 n=6)
geomean 2.763Gi 2.777Gi +0.51%
│ before │ after │
│ heap-B │ heap-B vs base │
Tsc/bluesky 934.7Mi ± 0% 934.7Mi ± 0% ~ (p=0.937 n=6)
Tsc/sentry 2.607Gi ± 0% 2.608Gi ± 0% ~ (p=0.937 n=6)
Tsc/t3code-server 2.303Gi ± 0% 2.303Gi ± 0% ~ (p=0.589 n=6)
Tsc/vscode 4.104Gi ± 0% 4.104Gi ± 0% ~ (p=0.589 n=6)
geomean 2.178Gi 2.178Gi +0.01%1 parent 319f2f4 commit d7c8ce4
2 files changed
Lines changed: 54 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
52 | | - | |
| 56 | + | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
| 60 | + | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
65 | 74 | | |
| 75 | + | |
66 | 76 | | |
67 | 77 | | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
71 | 85 | | |
72 | 86 | | |
73 | 87 | | |
| |||
80 | 94 | | |
81 | 95 | | |
82 | 96 | | |
83 | | - | |
| 97 | + | |
84 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
85 | 102 | | |
86 | 103 | | |
87 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 99 | + | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
| |||
119 | 117 | | |
120 | 118 | | |
121 | 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 | + | |
122 | 145 | | |
123 | 146 | | |
124 | 147 | | |
| |||
149 | 172 | | |
150 | 173 | | |
151 | 174 | | |
152 | | - | |
153 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
154 | 178 | | |
155 | 179 | | |
156 | 180 | | |
| |||
0 commit comments