See also Understanding performance using `@btime` and `@code_warntype`, `@code_llvm`, etc - #2 by tim.holy, which appears to apply here.
tim.holy
14
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Avoiding allocations from views: copyto! between arrays of different shape | 14 | 4184 | October 31, 2018 | |
| Why making `a[range] = b[range]` seems to make unnecessary allocations? | 4 | 1025 | September 30, 2019 | |
| Memory allocation with `view` and array assignment | 12 | 1372 | December 17, 2021 | |
| Preallocating the result of getindex(...) | 8 | 1465 | July 13, 2017 | |
| Proving that copyto! is allocation-free on a view, using AllocCheck | 7 | 242 | October 15, 2024 |