Commit d52169d
authored
Optimization: make State final and avoid construction via cls() (#20838)
Construction via cls() was pretty slow, possibly due to the large number
of keyword arguments, as this used a generic calling convention because
of mypyc limitations. This might improve performance of mostly cached,
huge incremental builds by 1-2% perhaps, if the CPU profiles I looked at
are to be trusted.1 parent a79b100 commit d52169d
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
2186 | 2187 | | |
2187 | 2188 | | |
2188 | 2189 | | |
| 2190 | + | |
2189 | 2191 | | |
2190 | 2192 | | |
2191 | 2193 | | |
| |||
2272 | 2274 | | |
2273 | 2275 | | |
2274 | 2276 | | |
2275 | | - | |
| 2277 | + | |
2276 | 2278 | | |
2277 | | - | |
2278 | 2279 | | |
2279 | 2280 | | |
2280 | 2281 | | |
| |||
2364 | 2365 | | |
2365 | 2366 | | |
2366 | 2367 | | |
2367 | | - | |
| 2368 | + | |
2368 | 2369 | | |
2369 | 2370 | | |
2370 | 2371 | | |
| |||
0 commit comments