-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Refactor lower_stmts #87773
Refactor lower_stmts #87773
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 28cf90d with merge 4e7f9014b4dc19485bb3ea6d3ebf68bab256b14f... |
&mut self, | ||
ast_stmts: &[Stmt], | ||
) -> (&'hir [hir::Stmt<'hir>], Option<&'hir hir::Expr<'hir>>) { | ||
let mut stmts = SmallVec::<[hir::Stmt<'hir>; 8]>::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if 8 is optimal, but I think it is already used in the current implementation, in alloc_from_iter
.
☀️ Try build successful - checks-actions |
Queued 4e7f9014b4dc19485bb3ea6d3ebf68bab256b14f with parent 6fe0886, future comparison URL. |
Finished benchmarking try commit (4e7f9014b4dc19485bb3ea6d3ebf68bab256b14f): comparison url. Summary: This benchmark run did not return any significant changes. 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. @bors rollup=never |
Neutral results I guess. Maybe it's easier to just close this PR. |
I have this change in #87688 but I think it deserves its own PR and a perf run.
Changes
lower_stmt
tolower_stmts
and avoid creating aSmallVec
for eachast::Stmt
.