Creating random `MMatrix` with large size is too slow

As it says in the README of StaticArrays.jl:

Note that in the current implementation, working with large StaticArrays puts a lot of stress on the compiler, and becomes slower than Base.Array as the size increases. A very rough rule of thumb is that you should consider using a normal Array for arrays larger than 100 elements.

Regarding

that depends entirely on what you’re trying to do. Do you really need static sizing here? Are you trying to stack allocate everything?

1 Like