I looked into both, it wasn’t too obvious from its docs what they are for (or for extensible), well for strided… so implicitly documented. Though I found:
StrideArray.jl
and PtrArray.jl
are mutable array types with optional static sizing providing by StrideArrays.jl
.
For me:
julia> SV = StrideVector{UInt32}
StrideArray{UInt32, D, T, 1, C, B, R, X, O, A} where {D, T, C, B, R, X, O, A}
julia> push!(SV, 2)
ERROR: MethodError: no method matching push!(::Type{StrideArray{UInt32, D, T, 1, C, B, R, X, O, A} where {D, T, C, B, R, X, O, A}}, ::Int64)
I just guess the “optional static sizing” is done differently. Could it (also) be done more user-friendly, also supporting push!
? I have a feeling this package was made more for Arrays rather than Vectors, so an afterthought?
Exactly what I had in mind. Is it still possible to do, or reuse, in Julia non-ergonomically? Anyway I recalled this, in LLVM, so not in std::vector, then not the reason C++ is faster here, but with it C++ could be even faster than Julia, here…