Commit cc8da78
committed
Auto merge of rust-lang#127288 - lqd:typelen-cache, r=compiler-errors
cache type sizes in type-size limit visitor
This is basically rust-lang#125507 (comment) as lcnr can't open the PR now.
Locally it reduces the `itertools` regression by quite a bit, to "only +50%" compared to nightly (that includes overhead from the local lack of artifact post-processing, and is just a data point to compare to the 10-20x timings without the cache).
```console
Benchmark 1: cargo +stage1 build --release
Time (mean ± σ): 2.721 s ± 0.009 s [User: 2.446 s, System: 0.325 s]
Range (min … max): 2.710 s … 2.738 s 10 runs
Benchmark 2: cargo +nightly build --release
Time (mean ± σ): 1.784 s ± 0.005 s [User: 1.540 s, System: 0.279 s]
Range (min … max): 1.778 s … 1.792 s 10 runs
Summary
cargo +nightly build --release ran
1.52 ± 0.01 times faster than cargo +stage1 build --release
```
On master, it's from 34s to the 2.7s above.
r? compiler-errors1 file changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
388 | 389 | | |
389 | 390 | | |
390 | 391 | | |
391 | | - | |
| 392 | + | |
392 | 393 | | |
| 394 | + | |
393 | 395 | | |
394 | | - | |
| 396 | + | |
395 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
396 | 404 | | |
397 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
398 | 411 | | |
399 | 412 | | |
400 | 413 | | |
401 | 414 | | |
402 | 415 | | |
403 | 416 | | |
404 | 417 | | |
405 | | - | |
| 418 | + | |
406 | 419 | | |
407 | 420 | | |
408 | 421 | | |
| |||
0 commit comments