HybridArrays.jl, an extension to
StaticArrays.jl that makes it easier to work with arrays that have both statically and dynamically sized axes. It should be as fast (or almost as fast) as
SArrays where both approaches work but
HybridArrays should generate efficient code in any scenario (
getindex, broadcasting) where the size of affected part of an array can be statically determined. Additionally, it can wrap any
AbstractArray and operations that are not supported by
HybridArrays.jl can by forwarded to the wrapped object.
Version 0.3.7 was just tagged, now with improved compatibility with the DiffEq ecosystem. Here we can see > 20x speedup with generic implicit solvers that don’t work with
SArrays, just by wrapping an array in
HybridArray: https://github.com/SciML/ArrayInterface.jl/issues/58 .