JuliaArrays / JuliaArrays/FillArrays.jl

`SquareEye` multiplication not specialized

Open
#394 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
187
Forks
41
Avg merge
17h 29m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Julia benchmarks for AB versus copy(A) with SquareEye, then inspect the existing multiplication path for SquareEye. Also test the downstream S(SB) example with ClassicalOrthogonalPolynomials and ToeplitzMatrices; done means the specialized multiplication removes the reported overhead and supports that use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.