Help with simplified StaticArrays implementation

StaticArrays takes about 1 second to load.

AbstractTensors takes 0.1 seconds to load.

The only feature from StaticArrays I need for the entire Grassmann.jl ecosystem can load in 0.1 seconds.

Grassmann.jl loads 2x faster without StaticArrays

Why would I want to wait ~4 seconds to load my packages, when I can cut it to 2 seconds by not depending on StaticArrays?

Also, in Grassmann.jl I can solve a linear system faster than StaticArrays does, so it’s not like I can’t do linear algebra without it. I can do linear algebra without it.

So therefore, I want to make Grassmann multi-linear algebra not depend on the big package StaticArrays

Not quite true, no. While, yes, I do define my own linear algebra methods, I already had my own types for that derived from wrapping SVector. Type piracy was never the issue. The main issue is that depending on SVector is too large of a dependency, because it needs to load all sort of extra things for matrices.

Note that the size in my static variant is always 1 dimensional, I never support higher dimensional arrays, because I can represent those as nested vectors.

So in AbstractTensors there is no Size it is always only a simple length and no other dimensions.

That’s what makes it simplified and different.

As you can see, I am in alignement with this approach, since I believe to only construct linear indexing initially, and then matrices get constructed from that later on.

I agree on this, I am only doing this as an experiment, and it is work i’d rather not have to do, but it seems to be making a big difference in load times.

1 Like