4 ms·
See the second paragraph of my comment with regard to representing matrices efficiently with just slices. I would argue that Rust is actually better here than m
by mintplant 9y ago
See the second paragraph of my comment with regard to representing matrices efficiently with just slices. I would argue that Rust is actually better here than most languages, as its native multidimensional "arrays" (slices) are equivalent in memory usage and performance to single-dimensional ones.
More generally, the 1-32 issue should be solved when RFC 2000 is implemented [0]. In the meantime there's generic-array [1], built on top of typenum [2], which you could think of as a sort of polyfill.
[0] https://github.com/rust-lang/rfcs/blob/master/text/2000-const-generics.md https://github.com/rust-lang/rfcs/blob/master/text/2000-cons...
[1] https://github.com/fizyk20/generic-array https://github.com/fizyk20/generic-array
[2] https://github.com/paholg/typenum https://github.com/paholg/typenum
- fermienrico 9y agoThank you for clarifying.