Skip to content

Missing dot product specializations for SparseArrays with Adjoint{<:SparseArray}s #627

@MasonProtter

Description

@MasonProtter

Here's an MWE where there's a 100x performance drop due to hitting the generic dot fallback when taking the inner product of a sparse array with the adjoint of a sparse array:

julia> using SparseArrays, LinearAlgebra, BenchmarkTools

julia> let N = 1000
           A = sprand(N, N, 0.1)
           At = spzeros(N, N)
           adjoint!(At, A)
           @btime $At  $A
           @btime $A'  $A
       end;
  509.345 μs (0 allocations: 0 bytes)
  32.945 ms (0 allocations: 0 bytes)

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