For a detailed discussion on the challenges that would crop up almost immediately when trying this, check out Faster zeros with calloc. The TL;DR is that the cost of initialization doesn’t vanish but gets shifted to the first write instead and that growing such an array immediately looses the “zero initialized” property.
Sukera
30
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Matrix{Bool}(1000000, 1000000) really? | 2 | 687 | December 26, 2018 | |
| Huge sparse array construction | 9 | 963 | April 12, 2020 | |
| Best practices - initialize a matrix | 4 | 892 | October 28, 2018 | |
| Is varinfo() designed to not report size of an array of sparse matrices? | 2 | 378 | January 22, 2021 | |
| How to efficiently construct a large SparseArray? Packages for this? | 20 | 1893 | May 15, 2022 |