rustdoc: Cache Attributes::doc_value#153135
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.
rustdoc: Cache `Attributes::doc_value`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (21552aa): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never 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 -0.5%, secondary 0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 3.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 480.132s -> 479.225s (-0.19%) |
Locally, this appears to improve wall-time performance on the stm32f4 benchmark by about 2%. Also, it makes intuitive sense that we don't want to recompute this over and over. I also made the `doc_strings` field private since any modifications to it will mean the `doc_value_cache` becomes stale.
e106d74 to
ce8bf91
Compare
|
r? rustdoc |
|
Based on the results on the rustc-perf website, the improvements seem to outweigh the regressions. However, it might still make sense to check the code more carefully to see if there's a way to get this improvement without causing regressions. |
|
@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.
rustdoc: Cache `Attributes::doc_value`
This comment has been minimized.
This comment has been minimized.
086f135 to
dee724b
Compare
This comment has been minimized.
This comment has been minimized.
It's now even smaller than before I added the `doc_value_cache` to `Attributes`. That's because in addition to boxing the cache field, I also converted `doc_strings` to be a `ThinVec` like the `other_attrs` field already is.
dee724b to
30c27fd
Compare
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (ac5108a): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never 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 2.0%, secondary -1.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 484.473s -> 480.37s (-0.85%) |
|
It seems like the regressions outweight improvements a bit. Still seems like a good idea though. Do you have some leads for reducing the regressions already? |
|
Hmm seems like it was better before I added the additional boxing. Although it could be just from the ThinVec change not from the doc value cache boxing. |
Locally, this appears to improve wall-time performance on the stm32f4
benchmark by about 2%. Also, it makes intuitive sense that we don't want
to recompute this over and over.
I also made the
doc_stringsfield private since any modifications toit will mean the
doc_value_cachebecomes stale.This optimization was found with help from the Coz causal profiler.
r? @ghost