Skip to content
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

Remove uses of PermutedDimsArray in pre and post-scaling #242

Merged
merged 6 commits into from
Jun 8, 2024

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Jan 31, 2024

The PermutedDimsArray constructor is type-unstable if the permutation is not a compile-time constant, so it's best to avoid this if possible. In this PR, I have replaced the broadcast operations by explicit loops, which should be equivalent for StridedArrays. This reduces many extraneous allocations, and occasionally improves performance.

Example:

julia> @btime chebyshevtransform($(rand(100)));
  51.582 μs (23 allocations: 1.75 KiB) # master
  49.714 μs (6 allocations: 1.19 KiB) # PR

I'm unsure if infinite arrays are expected to be compatible with this package, in which case we may leave a generic fallback using PermutedDimsArrays.

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9f135a8) 82.70% compared to head (da5f214) 82.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
- Coverage   82.70%   82.62%   -0.08%     
==========================================
  Files          15       15              
  Lines        2688     2677      -11     
==========================================
- Hits         2223     2212      -11     
  Misses        465      465              

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

@jishnub
Copy link
Member Author

jishnub commented Apr 27, 2024

bump

@jishnub jishnub merged commit 9dead75 into JuliaApproximation:master Jun 8, 2024
10 of 11 checks passed
@jishnub jishnub deleted the scalepermdim branch June 8, 2024 04:43
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