Compiler generates suboptimal code when array is iterated (works fine with slice). #94917
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
Couldn't find if that was reported yet.
This is example from reddit:
This produces suboptimal results:
while this works as expected:
Godbolt reference with comparison: https://godbolt.org/z/1T6G3s7Gz
The text was updated successfully, but these errors were encountered: