Skip to content

Faster iterate method for TrivialInterlacer #503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Jul 26, 2023

On master,

julia> o = Ones{Int}(ℵ₀)
ℵ₀-element Ones{Int64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}} with indices OneToInf()

julia> B = ApproxFunBase.BlockInterlacer((o, o))
ApproxFunBase.BlockInterlacer((Ones(ℵ₀), Ones(ℵ₀)))

julia> @btime first($B, 10);
  1.212 μs (28 allocations: 2.31 KiB)

julia> @btime Fun($(x->x^2), Chebyshev(-1..0)+Chebyshev(0..1));
  16.448 μs (140 allocations: 9.77 KiB)

This PR

julia> @btime first($B, 10);
  38.610 ns (1 allocation: 224 bytes)

julia> @btime Fun(x->x^2, Chebyshev(-1..0)+Chebyshev(0..1));
  14.697 μs (72 allocations: 4.97 KiB)

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.58% ⚠️

Comparison is base (4f33475) 71.88% compared to head (002687e) 71.31%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #503      +/-   ##
==========================================
- Coverage   71.88%   71.31%   -0.58%     
==========================================
  Files          81       81              
  Lines        8546     8547       +1     
==========================================
- Hits         6143     6095      -48     
- Misses       2403     2452      +49     
Files Changed Coverage Δ
src/LinearAlgebra/helper.jl 68.77% <100.00%> (-0.15%) ⬇️
src/Operators/banded/Conversion.jl 87.09% <100.00%> (+0.65%) ⬆️
src/eigen.jl 96.42% <100.00%> (ø)

... and 15 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jishnub jishnub merged commit 3b60481 into JuliaApproximation:master Jul 26, 2023
@jishnub jishnub deleted the trivialinterlaceriterate branch July 26, 2023 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant