JuliaApproximation / ApproxFunBase.jl

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

Reduce allocations in ProductFun coefficients #549

Closed jishnub closed 1 year ago

jishnub commented 1 year ago
julia> pf = (x,y)->x^2*y^3
#17 (generic function with 1 method)

julia> P = ProductFun(pf, Chebyshev() ⊗ Chebyshev());

julia> @btime coefficients($P, Chebyshev(), Chebyshev());
  469.056 ns (8 allocations: 768 bytes) # master
  290.199 ns (4 allocations: 448 bytes) # PR
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 50.00% and project coverage change: +0.05% :tada:

Comparison is base (414e1c5) 27.56% compared to head (6f8baf5) 27.61%. Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #549 +/- ## ========================================== + Coverage 27.56% 27.61% +0.05% ========================================== Files 80 80 Lines 8380 8386 +6 ========================================== + Hits 2310 2316 +6 Misses 6070 6070 ``` | [Files Changed](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/549?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation) | Coverage Δ | | |---|---|---| | [src/Multivariate/ProductFun.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/549?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL011bHRpdmFyaWF0ZS9Qcm9kdWN0RnVuLmps) | `0.00% <0.00%> (ø)` | | | [src/Operators/Operator.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/549?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL09wZXJhdG9ycy9PcGVyYXRvci5qbA==) | `51.98% <100.00%> (+0.10%)` | :arrow_up: | | [src/Operators/banded/Conversion.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/549?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL09wZXJhdG9ycy9iYW5kZWQvQ29udmVyc2lvbi5qbA==) | `28.12% <100.00%> (+1.14%)` | :arrow_up: | | [src/Operators/general/algebra.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/549?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL09wZXJhdG9ycy9nZW5lcmFsL2FsZ2VicmEuamw=) | `66.22% <100.00%> (+0.79%)` | :arrow_up: |

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