Skip to content

SquareEye multiplication not specialized #394

Open
@putianyi889

Description

@putianyi889

Similar issue: #107

julia> A = rand(1000,1000);

julia> B=Eye(1000);

julia> @btime A*B;
  1.414 ms (3 allocations: 7.63 MiB)

julia> @btime copy(A)
  1.097 ms (3 allocations: 7.63 MiB)

Downstream issue:

julia> using ClassicalOrthogonalPolynomials, ToeplitzMatrices

julia> B=Toeplitz(1:∞,1:∞)
ℵ₀×ℵ₀ Toeplitz{Int64, InfiniteArrays.InfUnitRange{Int64}, InfiniteArrays.InfUnitRange{Int64}} with indices OneToInf()×OneToInf():
  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23    
  2  1  2  3  4  5  6  7  8   9  10  11  12  13  14  15  16  17  18  19  20  21  22
  3  2  1  2  3  4  5  6  7   8   9  10  11  12  13  14  15  16  17  18  19  20  21
  4  3  2  1  2  3  4  5  6   7   8   9  10  11  12  13  14  15  16  17  18  19  20
  5  4  3  2  1  2  3  4  5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
  6  5  4  3  2  1  2  3  4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  
  7  6  5  4  3  2  1  2  3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
  8  7  6  5  4  3  2  1  2   3   4   5   6   7   8   9  10  11  12  13  14  15  16
  9  8  7  6  5  4  3  2  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
 10  9  8  7  6  5  4  3  2   1   2   3   4   5   6   7   8   9  10  11  12  13  14     
                                                                                

julia> S=Legendre()
Legendre()

julia> S\(S*B) # freeze

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