Examples of programs (simulations, etc.) sped up with StaticArrays

Hey folks,

I’m looking for some examples of programs that got sped up by using StaticArrays—do any of you have an example (preferably real-world or close to real-world) of a time when dropping StaticArrays into your problem gave you a performance boost?

Context: I’m exploring how different languages do unusual things with metaprogramming—StaticArrays is a good example of this in that you can often get big performance improvements through metaprogramming with little effort on the part of the end user.

Thanks!

As far as I understand, Static Arrays utility does not come from it having metaprogramming macros. The macros are used for having practical constructors, but the performance is associated just to having tuples of known size for which convenient algebra is defined.

That said, I think that most packages dealing with particle coordinates represent them with vectors of static arrays. Take a look at the JuliaMolSim organization packages, for example.

3 Likes

There’s some metaprogramming on with all the @generated stuff to specialize code to the array sizes. And I still consider the macros that make StaticArrays convenient to construct and use important. :slight_smile:

Thanks for the suggestion! I’ll look at the JuliaMolSim packages.

1 Like