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 | 4181 | October 31, 2018 | |
| Why making `a[range] = b[range]` seems to make unnecessary allocations? | 4 | 1024 | September 30, 2019 | |
| Memory allocation with `view` and array assignment | 12 | 1371 | December 17, 2021 | |
| Preallocating the result of getindex(...) | 8 | 1464 | July 13, 2017 | |
| Proving that copyto! is allocation-free on a view, using AllocCheck | 7 | 237 | October 15, 2024 |