Skip to content

rustdoc: write directly to buffer in inner_full_print #94304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

notriddle
Copy link
Contributor

This change avoids several temporary allocations for every argument.

This change avoids several temporary allocations for every argument.
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 23, 2022
@rust-highfive
Copy link
Contributor

r? @CraftSpider

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 23, 2022
@CraftSpider
Copy link
Contributor

This looks fine, going to do a perf run and see if it has any impact. I think it's...
@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 3, 2022
@bors
Copy link
Collaborator

bors commented Mar 3, 2022

⌛ Trying commit 41de685 with merge e22cfc7e9d1b50e293ac3caff191a248bd48c108...

@bors
Copy link
Collaborator

bors commented Mar 3, 2022

☀️ Try build successful - checks-actions
Build commit: e22cfc7e9d1b50e293ac3caff191a248bd48c108 (e22cfc7e9d1b50e293ac3caff191a248bd48c108)

@rust-timer
Copy link
Collaborator

Queued e22cfc7e9d1b50e293ac3caff191a248bd48c108 with parent 4566094, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e22cfc7e9d1b50e293ac3caff191a248bd48c108): comparison url.

Summary: This benchmark run shows 1 relevant improvement 🎉 but 1 relevant regression 😿 to instruction counts.

  • Arithmetic mean of all relevant changes: 1.5%
  • Largest improvement in instruction counts: -0.9% on full builds of externs doc
  • Largest regression in instruction counts: 4.0% on incr-full builds of coercions debug

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking 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 led to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Mar 4, 2022
@CraftSpider
Copy link
Contributor

I'm not 100% sure how perf handles doc changes, and whether these are relevant. I'm going to ask the perf team on Zulip.

@nnethercote
Copy link
Contributor

The ones labelled doc measure rustdoc speed. The website filters uninteresting results by default, you can uncheck the "Show only significant changes" and "Filter out very small changes" boxes to see all the results.

In short, very little changed. The variations you do see are almost certainly noise. I think your changes are good -- they do avoid unnecessary allocations, and make the code easier to read -- but I suspect they happen on a code path that isn't hot.

@camelid
Copy link
Member

camelid commented Mar 11, 2022

The regression is spurious.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Mar 11, 2022
@CraftSpider
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 11, 2022

📌 Commit 41de685 has been approved by CraftSpider

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2022
@bors
Copy link
Collaborator

bors commented Mar 11, 2022

⌛ Testing commit 41de685 with merge f58d51b...

@bors
Copy link
Collaborator

bors commented Mar 11, 2022

☀️ Test successful - checks-actions
Approved by: CraftSpider
Pushing f58d51b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 11, 2022
@bors bors merged commit f58d51b into rust-lang:master Mar 11, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 11, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f58d51b): comparison url.

Summary: This benchmark run did not return any relevant results. 3 results were found to be statistically significant but too small to be relevant.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@rustbot rustbot removed the perf-regression Performance regression. label Mar 11, 2022
@notriddle notriddle deleted the notriddle/buffer-args branch March 11, 2022 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants