Open thchr opened 8 months ago
stack(iter) isa MMatrix
, made I believe by similar
and then the same code paths used for Array
s.
But @which reduce(hcat, iter)
points to a method reduce(::typeof(hcat), A::StaticArray{<:Tuple,<:StaticVecOrMatLike})
in StaticArrays, which makes an SMatrix
. That package could define similar fast methods for stack
acting on its types.
I noticed that
stack
is slower than a naivereduce
-based implementation for nestedSVector
s:The code path seems to be via
_typed_stack(::Colon, ::Float64, ::SVector{3, Float64}, iter)
. I could not immediately figure out what is causing the slowdown.