Uh oh!
There was an error while loading. Please reload this page.
[perf] rustdoc: Perform less work when cleaning middle::ty parenthesized generic args - #132886
Conversation
fmease
commented
Nov 11, 2024
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
bors
commented
Nov 11, 2024
…s, r=<try> [perf] rustdoc: Perform less work when cleaning parenthesized generic args CC rust-lang#132697. I presume the perf regression it caused (if real) boils down to query invocation overhead (namely, of `def_kind` & `trait_def`). I won't address that because it would worsen the clean middle API. So I'm simply trying to attack some low-hanging fruits in the vicinity. r? ghost
Uh oh!
There was an error while loading. Please reload this page.
bors
commented
Nov 11, 2024
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
rust-timer
commented
Nov 11, 2024
Finished benchmarking commit (66ae3a1): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.1%, secondary 0.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary -2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 786.53s -> 785.607s (-0.12%) |
e51bfa6 to
0cebb35Compare| return None; | ||
| } | ||
| // Elide internal host effect args. |
fmease
commented
Nov 11, 2024
2/5 benchmarks spurious (not a doc profile). corrected perf summary:
r? rustdoc |
0cebb35 to
4660316CompareGuillaumeGomez
commented
Nov 11, 2024
When the PR is ready for you, please run the perf check:
|
This comment has been minimized.
This comment has been minimized.
fmease
commented
Nov 11, 2024
Oh, nothing really changed with my two force-pushes, I only renamed a variable 😅 |
GuillaumeGomez
commented
Nov 11, 2024
Oh I don't judge, you can do as many renamings as you want. 🤣 |
fmease
commented
Nov 11, 2024
Right, it's ready, that's what I meant to say above. I might come back to #132697's regression but for now, I won't due to time constraints. |
fmease
commented
Nov 11, 2024
@bors r=GuillaumeGomez |
bors
commented
Nov 11, 2024
bors
commented
Nov 13, 2024
bors
commented
Nov 13, 2024
☀️ Test successful - checks-actions |
rust-timer
commented
Nov 13, 2024
Finished benchmarking commit (ec239b8): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.8%, secondary 3.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary -2.2%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 784.378s -> 786.527s (0.27%) |
lqd
commented
Nov 13, 2024
Compile time regressions on a rustdoc change? I don't think so, perf bot. @rustbot label: +perf-regression-triaged (these should stabilize in the next merge, hopefully, so let's re-check later) |
CC #132697. I presume the perf regression it caused (if real) boils down to query invocation overhead, namely of
def_kind&trait_defas we don't seem to be decoding more often from the crate metadata.I won't try the obvious and reduce the amount of query calls by threading information via params as that would render the code awkward.
So instead I'm simply trying to attack some low-hanging fruits in the vicinity.
Previously, we would
clean_middle_generic_argsunconditionally insideclean_middle_generic_args_with_constraintseven though we didn't actually use its result for parenthesized generic args (Trait(...) -> ...).Now, we only call
clean_middle_generic_argswhen necessary. Lastly, I've simplifiedclean_middle_generic_args_with_constraints.r? ghost