Avoiding allocation when accessing fields of a StructArray inside a Struct

This is not a concrete type, so it ends up being boxed. You can get type stability with writing about this much like so:

struct MyStruct{T <: StructVector{Foo1}}
    foo::T
end
2 Likes