3 ms·
Lack of multidimensional arrays as a language primitive is a problem. [...] "It can be done with templates" I am wondering what your point is. There are excell
by danieldk 9y ago
Lack of multidimensional arrays as a language primitive is a problem. [...] "It can be done with templates"
I am wondering what your point is. There are excellent and performant C++ template-based libraries for tensors (Eigen, Armadillo, etc.). In Rust I have used ndarray a bit for linear algebra and it is quite good [1].
If you have parametric polymorphism and operator overloading, whet is the problem of doing it in a library?
The big advantage of doing this in the language is that there's a lot of hardware support for doing number-crunching fast on dense arrays, and you want the compiler to be using it effectively.
Last time I checked Intel MKL (and wrappers like Armadillo) was still the fastest for doing number crunching of dense arrays on CPUs.
[1] The primary problem I ran into was that some common expressions were not backed by BLAS yet.