You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An initial inspection suggests that the offending methods for vcat/hcat are LinearAlgebra._vcat(A::Union{Number, LinearAlgebra.UniformScaling, AbstractVecOrMat}...; array_type) and the matching _hcat, which are (as of this writing) defined at uniformscaling.jl#L426. A loop over the input vararg tuple appears to cause dynamic dispatch.
hvcat has the same problem, likely arising from a similar loop in uniformscaling.jl#446.
The text was updated successfully, but these errors were encountered:
mikmoore
changed the title
Poor performance of vcat/hcat on mixed input types
Poor performance of vcat/hcat/hvcat on mixed input types
Mar 1, 2023
I guess I'm and #41394 are to blame. GitHub says that will only released as v1.9, but I do find the corresponding code in v1.8.x. I think I have a solution to this, will make a PR soon.
From this Discourse thread.
On version 1.8.0 (sorry it's what i have handy, but the offending method appears unchanged on current
master
):with similar results for
hcat
andhvcat
.An initial inspection suggests that the offending methods for
vcat
/hcat
areLinearAlgebra._vcat(A::Union{Number, LinearAlgebra.UniformScaling, AbstractVecOrMat}...; array_type)
and the matching_hcat
, which are (as of this writing) defined at uniformscaling.jl#L426. A loop over the input vararg tuple appears to cause dynamic dispatch.hvcat
has the same problem, likely arising from a similar loop in uniformscaling.jl#446.The text was updated successfully, but these errors were encountered: