JuliaApproximation / ApproxFunBase.jl

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

Reduce allocations in blocklengths #551

Closed jishnub closed 1 year ago

jishnub commented 1 year ago
julia> @btime ApproxFunBase.blocklengths(Chebyshev()|(4:10));
  361.251 ns (11 allocations: 416 bytes) # master
  293.383 ns (7 allocations: 288 bytes) # PR

Using Zeros instead of zeros reduces allocations.

codecov[bot] commented 1 year ago

Codecov Report

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

Comparison is base (414e1c5) 27.56% compared to head (a4810fa) 27.61%. Report is 4 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #551 +/- ## ========================================== + 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/551?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/551?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/Spaces/SubSpace.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/551?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL1NwYWNlcy9TdWJTcGFjZS5qbA==) | `2.04% <0.00%> (ø)` | | | [src/Operators/Operator.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/551?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/551?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/551?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.