Skip to content

special case copyto!(::Bidiagonal, ::Bidiagonal) #1061

@dlfivefifty

Description

@dlfivefifty

At the moment copyto! with Bidiagonal is O(n^2):

julia> n = 1000; B = Bidiagonal(randn(n), randn(n-1), :L); @time copyto!(B, B);
  0.002047 seconds (3 allocations: 16.031 KiB)

julia> n = 10_000; B = Bidiagonal(randn(n), randn(n-1), :L); @time copyto!(B, B);
  0.127239 seconds (5 allocations: 156.375 KiB)

julia> n = 100_000; B = Bidiagonal(randn(n), randn(n-1), :L); @time copyto!(B, B);
 11.586487 seconds (5 allocations: 1.526 MiB)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions