Repository navigation
Reserve more capacity for Symbol interner - #164150
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reserve more capacity for Symbol interner
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (5b8e645): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.4%, secondary -1.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.5%, secondary 0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 492.622s -> 489.363s (-0.66%) |
06db82d to
bd198f3
Compare
|
Looks good. I didn't expect Nevertheless, my main hope for this is that it at least slightly reduces noise from some of these small benchmarks, but we will have to see how it plays out in the future. r? nnethercote |
| // reduce resizing for normal code without regresing memory use for smaller crates. | ||
| // FIXME(panstromek): we could do better if we take into account whether this is | ||
| // Debug/Opt build. Those builds intern at least 6k more symbols than Check ones. | ||
| let additional_capacity = 2400; |
There was a problem hiding this comment.
There was a problem hiding this comment.
I'll leave it as let if you don't mind, I think it will make sense to make it dynamic in the future (as hinted in the fixme).
|
If non-toy benchmarks use ~5,000, would that be a better value to use? Or maybe 4096? |
|
Anyway, seems fine, I'll let you decide the right number to use. r=me once you've decided. @bors delegate=panstromek |
|
✌️ @panstromek, you can now approve this pull request! If @nnethercote told you to " |
|
Thanks!
Possibly. I wanted to get in some non-controversial number first, to serve as a baseline, before trying some more complicated tradeoff. 5k is for @bors r=nnethercote Also, the regression in coercions is something unrelated based on the cachegrind diff, so I think that's just noise. @rustbot label: +perf-regression-triaged |
|
@bors rollup=iffy |
…uwer Rollup of 4 perf-sensitive pull requests Successful merges: - #163425 (Treat union fields as aliasing each other in value_analysis) - #164074 (Avoid cloning impl trait AST nodes in late resolution) - #164089 (Implement `clone_from` for `BorrowckDomain`) - #164150 (Reserve more capacity for Symbol interner)
Rollup merge of #164150 - panstromek:pre-alloc-symbol-intern, r=nnethercote Reserve more capacity for Symbol interner This avoids some resizing and rehashing. More details in the added comment.
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (19d761c): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (secondary 0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Artifact size: 406.63 MiB -> 406.93 MiB (0.07%) |
|
part of the result looks like the
|
…uwer Rollup of 4 perf-sensitive pull requests Successful merges: - rust-lang/rust#163425 (Treat union fields as aliasing each other in value_analysis) - rust-lang/rust#164074 (Avoid cloning impl trait AST nodes in late resolution) - rust-lang/rust#164089 (Implement `clone_from` for `BorrowckDomain`) - rust-lang/rust#164150 (Reserve more capacity for Symbol interner)
This avoids some resizing and rehashing. More details in the added comment.