This is on julia 1.5.3
julia> f = qr(ones(100, 20), Val(true)); julia> copy(f.Q); @time copy(f.Q); 0.057310 seconds (40.00 k allocations: 338.516 MiB, 10.85% gc time) julia> copy(Array(f.Q)); @time copy(Array(f.Q)); 0.000074 seconds (7 allocations: 84.969 KiB) julia> typeof(copy(f.Q)) == typeof(copy(Array(f.Q))) true
copy appears to be called in
svdvals which slows to a crawl for large matrices. Is this a known issue?
It appears that
copy(f.Q) relies on a default method for
AbstractArrays, which might explain the difference in performance. Is this something that may be improved?