One option is UnsafeArrays; see e.g. this post: Array views becoming dominant source of memory allocation - #32 by oschulz. The current rule of thumb is that creating an array view will allocate if the view is used as an argument to a non-inlined function or if it is returned from a function.
tkoolen
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Optimization of array views | 6 | 669 | August 8, 2018 | |
| Using `view` in 0.6 on a ragged array | 12 | 1167 | July 22, 2017 | |
| Is there a way to guarantee 0 allocations when accessing an array? | 18 | 4440 | June 1, 2017 | |
| Puzzled by the difference in performance when summing an array in different ways | 4 | 916 | July 19, 2019 | |
| Understanding Allocations and Views | 4 | 826 | January 21, 2022 |