eschnett / FastSphericalHarmonics.jl

Easy-to-use Spherical Harmonics, based on FastTransforms.jl
MIT License
19 stars 3 forks source link

Use array views in spin functions #2

Closed jishnub closed 1 year ago

jishnub commented 1 year ago

This should reduce some memory allocation

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -3.66 :warning:

Comparison is base (3d6990d) 66.77% compared to head (7b108bb) 63.12%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2 +/- ## ========================================== - Coverage 66.77% 63.12% -3.66% ========================================== Files 4 4 Lines 301 301 ========================================== - Hits 201 190 -11 - Misses 100 111 +11 ``` | [Impacted Files](https://app.codecov.io/gh/eschnett/FastSphericalHarmonics.jl/pull/2?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Erik+Schnetter) | Coverage Δ | | |---|---|---| | [src/spin.jl](https://app.codecov.io/gh/eschnett/FastSphericalHarmonics.jl/pull/2?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Erik+Schnetter#diff-c3JjL3NwaW4uamw=) | `92.50% <100.00%> (-6.25%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/eschnett/FastSphericalHarmonics.jl/pull/2/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Erik+Schnetter)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

eschnett commented 1 year ago

Thank you! I was not aware of the convenient @views macro, and didn't spot the places where the previous code had unnecessary allocations.