rustc_metadata: Do not encode unnecessary module children by petrochenkov · Pull...
source link: https://github.com/rust-lang/rust/pull/95899
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
New issue
rustc_metadata: Do not encode unnecessary module children #95899
Conversation
added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label
added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label
Awaiting bors try build completion.
@rustbot label: +S-waiting-on-perf
added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label
Try build successful - checks-actions
Build commit: ab97670 (ab97670d6b187ca5c79ef1f034cb0cf847d414a0
)
Finished benchmarking commit (ab97670): comparison url.
Summary:
- Primary benchmarks: no relevant changes found
- Secondary benchmarks: relevant improvements found
Regressions
(primary)
Regressions
(secondary)
Improvements
(primary)
Improvements
(secondary)
All
(primary)
count1 0 0 0 14 0
mean2 N/A N/A N/A -0.6% N/A
max N/A N/A N/A -1.4% N/A
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 may lead to changes in compiler perf.
@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression
Footnotes
-
number of relevant changes
-
the arithmetic mean of the percent change
Awaiting bors try build completion.
@rustbot label: +S-waiting-on-perf
added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label
Try build successful - checks-actions
Build commit: 375662f (375662f24f455afd30df0f92c7fe92d4c168bbb8
)
Finished benchmarking commit (375662f): comparison url.
Summary:
- Primary benchmarks: relevant improvements found
- Secondary benchmarks: relevant improvements found
Regressions
(primary)
Regressions
(secondary)
Improvements
(primary)
Improvements
(secondary)
All
(primary)
count1 0 3 13 31 13
mean2 N/A 0.6% -0.3% -0.5% -0.3%
max N/A 0.6% -0.6% -1.5% -0.6%
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 may lead to changes in compiler perf.
@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression
Footnotes
-
number of relevant changes
-
the arithmetic mean of the percent change
removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label
This feels so much cleaner!
Should we use the same iter_from_generator
to make for_each_module_child
return an iterator?
compiler/rustc_data_structures/src/lib.rs
Show resolved
}
/// An adapter for turning a generator closure into an iterator, similar to `iter::from_fn`.
pub fn iter_from_generator<G: Generator + Unpin>(generator: G) -> impl Iterator<Item = G::Yield> {
I almost feel this should be in std
.
I'll make separate PR to add this to libcore, not sure whether it will be merged and how much time it may take.
I don't know why this functionality wasn't added yet, maybe there are reasons - the body of work produced by async-wg is vast, but I didn't read any of it.
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
Should we use the same
iter_from_generator
to makefor_each_module_child
return an iterator?
I'll try to do it a bit later in a separate PR.
The previous attempt to do it with iterator combinators wasn't very successfull.
FWIW, I also tried to move insertion of struct/variant constructors to module children lists from decoding to encoding, but encountered some ICE in rustc_mir_transform
for generators (petrochenkov@813575f). Probably need to minimize it somehow and report as an issue.
@rustbot ready
added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
labels
@bors r+
Commit 233fa65 has been approved by cjgillot
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
Test successful - checks-actions
Approved by: cjgillot
Pushing 563ef23 to master...
Finished benchmarking commit (563ef23): comparison url.
Summary:
- Primary benchmarks: no relevant changes found
- Secondary benchmarks: mixed results
Regressions
(primary)
Regressions
(secondary)
Improvements
(primary)
Improvements
(secondary)
All
(primary)
count1 0 4 0 10 0
mean2 N/A 0.9% N/A -0.7% N/A
max N/A 1.1% N/A -1.4% N/A
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.
Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged
along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged
label to this PR.
@rustbot label: +perf-regression
Footnotes
-
number of relevant changes
-
the arithmetic mean of the percent change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
merged-by-bors This PR was explicitly merged by bors perf-regression Performance regressions S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
None yet
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK