JuliaApproximation / ApproxFunBase.jl

Core functionality of ApproxFun
MIT License
12 stars 13 forks source link

Reduce allocations in symmetric eigen #532

Closed jishnub closed 1 year ago

jishnub commented 1 year ago
ω = 25.0
d = -10..10;
S = Legendre(d);
V = Fun(x -> ω * x^2 + x^4, S)
L = -Derivative(S, 2) + V;
B = Dirichlet(S);
SE = ApproxFun.SymmetricEigensystem(L, B);

Using this,

julia> @btime ApproxFunBase.bandmatrices_eigen($SE, 100);
  3.108 ms (6871 allocations: 1.50 MiB) # master
  3.027 ms (6427 allocations: 1.48 MiB) # PR
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 16.66% and no project coverage change.

Comparison is base (27c3236) 27.41% compared to head (1bd5c52) 27.42%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #532 +/- ## ======================================= Coverage 27.41% 27.42% ======================================= Files 80 80 Lines 8363 8366 +3 ======================================= + Hits 2293 2294 +1 - Misses 6070 6072 +2 ``` | [Files Changed](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/532?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation) | Coverage Δ | | |---|---|---| | [src/eigen.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/532?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL2VpZ2VuLmps) | `0.00% <0.00%> (ø)` | | | [src/Spaces/QuotientSpace.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/532?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL1NwYWNlcy9RdW90aWVudFNwYWNlLmps) | `3.95% <28.57%> (+0.50%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.