-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: Cleanup DocFragment
#91034
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
rustdoc: Cleanup DocFragment
#91034
Conversation
`count()` iterates over the whole collection. Using `len()` instead, or `.next().is_none()` when comparing to zero, should be faster.
r? @ollie27 (rust-highfive has picked a reviewer for you, use r? to override) |
r? @jyn514 |
@bors rollup=never @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a792234 with merge b98346f79d66ea8b1401c45ec592586c5973786f... |
r=me whether or not there are perf improvements |
☀️ Try build successful - checks-actions |
Queued b98346f79d66ea8b1401c45ec592586c5973786f with parent 548c108, future comparison URL. |
Finished benchmarking commit (b98346f79d66ea8b1401c45ec592586c5973786f): comparison url. Summary: This change led to large relevant mixed results 🤷 in compiler performance.
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 @bors rollup=never |
@bors r=jyn514 rollup=never |
📌 Commit a792234 has been approved by |
@bors r=jyn514 rollup=never |
📌 Commit a40e7a8e785271d892333812032468ac2e1b3ef6 has been approved by |
This comment has been minimized.
This comment has been minimized.
We think `.as_str().lines().next().is_none()` should be equivalent to `== kw::Empty`. Co-authored-by: Joshua Nelson <github@jyn.dev>
@bors r- ci is broken |
@bors r=jyn514 |
📌 Commit 7a4e2ce has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a77da2d): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Max-rss improvement on this is actually pretty decent, between -.8% and -1.4% :) |
DocFragment.line
fieldIterator::count()
where possible