JuliaApproximation / JuliaApproximation/SingularIntegrals.jl

Performance of RecurrenceArray

Open
#17 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
7
Forks
4
Avg merge
6h 18m
Merged PRs (30d)
5

Description

Sometimes RecurrenceArray is slower than getindex when actually assembling the values e.g.

using ClassicalOrthogonalPolynomials
using SingularIntegrals

import ClassicalOrthogonalPolynomials: recurrenecoefficients
import SingularIntegrals: RecurrenceArray

P = Jacobi(1/3,1/3)
xc = range(-1,1; length=10000)
n = 10000

# getindex baseline ~ 1.102867 seconds
@time pp = P[xc,1:n];
# Lazy is fast ~  0.000466 seconds
@time pr = RecurrenceArray(xc, recurrencecoefficients(P), P[xc, 1:2]');
# Actually getting the matrix is "slow" ~ 1.706700 seconds 
@time pr[1:n,1:length(xc)]';

pr ≈ pp

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 benchmark in the issue, comparing P[xc,1:n] with materializing RecurrenceArray(xc, recurrencecoefficients(P), P[xc, 1:2]') through pr[1:n,1:length(xc)]'. Investigate the RecurrenceArray assembly path and measure the result; done means materialization is no slower than the getindex baseline while preserving pr ≈ pp.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.