Skip to content
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

[WIP] rustc_metadata: Switch each_child_of_item from callback to iterator #92251

Closed
wants to merge 1 commit into from

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Dec 24, 2021

to avoid allocations.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 24, 2021
@rust-highfive
Copy link
Collaborator

r? @jackh726

(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 Dec 24, 2021
@petrochenkov
Copy link
Contributor Author

@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 Dec 24, 2021
@bors
Copy link
Contributor

bors commented Dec 24, 2021

⌛ Trying commit b738128c6398f4751333ed9acd5e79d11763e1ad with merge c11423e489f70294eb5ece1e027fc8e9b0c376ec...

@bors
Copy link
Contributor

bors commented Dec 24, 2021

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

@rust-timer
Copy link
Collaborator

Queued c11423e489f70294eb5ece1e027fc8e9b0c376ec with parent 59337cd, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c11423e489f70294eb5ece1e027fc8e9b0c376ec): comparison url.

Summary: This change led to very large relevant regressions 😿 in compiler performance.

  • Very large regression in instruction counts (up to 13.7% on incr-unchanged builds of issue-88862)

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 Dec 24, 2021
@petrochenkov
Copy link
Contributor Author

WTF 😂
Is rustc+LLVM really that bad at inlining a few layers of iterators? Or is it chain to blame?

Anyway, this is waiting on #92245, #92153, #92086, #92034, and #91795.
I'll re-measure once those PRs are merged or closed.

@petrochenkov petrochenkov added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 24, 2021
@mati865
Copy link
Contributor

mati865 commented Dec 27, 2021

Is rustc+LLVM really that bad at inlining a few layers of iterators? Or is it chain to blame?

I've seen edge cases when chain(..) performs terrible but usually it's more about the iterators or their content. One of extreme examples: https://rust.godbolt.org/z/Paf5ofnrq

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Feb 25, 2022
@petrochenkov
Copy link
Contributor Author

@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 Feb 25, 2022
@bors
Copy link
Contributor

bors commented Feb 25, 2022

⌛ Trying commit 7bd38c9 with merge de48e65ece49a289d7202477e406fd727029f15a...

@petrochenkov petrochenkov removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. perf-regression Performance regression. labels Feb 25, 2022
@bors
Copy link
Contributor

bors commented Feb 25, 2022

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

@rust-timer
Copy link
Collaborator

Queued de48e65ece49a289d7202477e406fd727029f15a with parent d981633, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (de48e65ece49a289d7202477e406fd727029f15a): comparison url.

Summary: This benchmark run shows 47 relevant regressions 😿 to instruction counts.

  • Arithmetic mean of relevant regressions: 0.6%
  • Largest regression in instruction counts: 2.8% 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. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Feb 26, 2022
@jackh726 jackh726 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 26, 2022
@jackh726
Copy link
Member

Let me know when this is ready for review.

@petrochenkov
Copy link
Contributor Author

Looks like it's still not an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants