You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JakobDegen opened this issue
Apr 20, 2022
· 3 comments
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.
The interesting thing to note here is the comparisons, which should definitely not be there. This problem significantly worsens when you increase the number of elements. I believe the source of these comparisons is that map is implemented via an iterator, which means that we build an Option<&u8> at some point. Still though, the LLVM IR:
rustbot
added
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
labels
Apr 20, 2022
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.
Note: I am aware of #91521 and related issues for this function, and believe that this has a separate cause
I tried this code:
Assembly (
rustc -Copt-level=3 -Cdebuginfo=0 --edition 2021
, godbolt):The interesting thing to note here is the comparisons, which should definitely not be there. This problem significantly worsens when you increase the number of elements. I believe the source of these comparisons is that
map
is implemented via an iterator, which means that we build anOption<&u8>
at some point. Still though, the LLVM IR:LLVM IR
Does look to have all the information necessary to continue optimizing.
Meta
rustc --version --verbose
:@rustbot labels +A-llvm +I-slow
The text was updated successfully, but these errors were encountered: