-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Fix array::IntoIter::fold
to use the optimized Range::fold
#95602
Conversation
It was using `Iterator::by_ref` in the implementation, which ended up pessimizing it enough that, for example, it didn't vectorize when we tried it in the <https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/Reducing.20sum.20into.20wider.20types> conversation. Demonstration that the codegen test doesn't pass on the current nightly: <https://rust.godbolt.org/z/Taxev5eMn>
(rust-highfive has picked a reviewer for you, use r? to override) |
Huh, interesting. It previously used |
Friendly one-month review reminder ping, @joshtriplett. |
@bors r+ rollup=never |
📌 Commit e8fc7ba has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (9fbbe75): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
It was using
Iterator::by_ref
in the implementation, which ended up pessimizing it enough that, for example, it didn't vectorize when we tried it in the https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/Reducing.20sum.20into.20wider.20types conversation.Demonstration that the codegen test doesn't pass on the current nightly: https://rust.godbolt.org/z/Taxev5eMn