Open
Description
I don't know if this is the right place for this, but I'd like to report that array::map
uses the stack excessively and operating on larger arrays result in unexpected stack overflows.
Minimal example: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=2d96e8f66b3432a8d1ecf0ca4331f85a
In the example, at some point more than 16 times more stack is used than the original array size.
As far as I've looked into the actual code, the only thing that stood out to me is use of core::mem::transmute_copy
instead of core::mem::transmute
in core::array::IntoIter::new
, but I doubt it's the reason for this.
Originally posted by @PonasKovas in #75243 (comment)
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: `[T; N]`Category: An issue highlighting optimization opportunities or PRs implementing suchIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to performance of generated code.Relevant to the compiler team, which will review and decide on the PR/issue.