JuliaArrays / JuliaArrays/FillArrays.jl
`SquareEye` multiplication not specialized
Open
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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