When should a package move to the standard library or system image? StaticArrays, what is it?

StaticArrays used to load quickly but as more and more stuff got put into it, it got slower and slower. 5 arg mul! support really slowed it down IIRC. But that seems like something that should be brought up with the development of StaticArrays.jl and not an argument for putting something as a stdlib. It sets a weird precedent in that you make something slow and therefore it should be in the sysimage.

Also, I don’t think the load time of StaticArrays is something inherent to the library but more a consequence of the implementation.

A StaticArrays implementation in Base should not need to be more than a few hundred lines max, defining the very basic operations and then everything should work generically, just like with other abstract array. Some compiler optimizations to avoid intermediate mutable static arrays to build up the result might be needed. The current StaticArrays pretty much has a duplicate implementation of all the functions it support which isn’t really maintainable. There are many cases where the API slightly differs in what it supports due to that.

Yes, I can clean it up a bit and put it up. It’s not very complete but it was quite easy to find some cases where Julia could probably do better from it.

28 Likes