Using `similar` for preallocation
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- julia
- Domain
- backend-api-design
Research direction
Start by reading src/definitions.jl at line 28 and tracing the preallocation path that avoids similar(x). Investigate the historical reason mentioned in the issue, then assess the StaticVector compatibility concern. Done means the project has a maintainer-approved resolution, with the behavior or rationale updated accordingly.
Written by the indexing model from the issue text.
Description
In line 28, whoever originally wrote this expressly went out of their way to avoid using y = similar(x). I can't seem to find any discussion as to why this was done except for the vague comment, but I'm currently trying to interface with AbstractFFTs and this would be a huge minus for me.
Currently, I'm respecting whatever type the user inputs. While just plugging in AbstractFFTs would likely work just fine, I think this behavior could be undesirable. For example, right now, using StaticVector as both input and output accelerates the algorithms tremendously, which is particularly consequential when performing many very small FFTs. I asked @ararslan about this a few weeks ago, and got the response that this was ported over from when AbstractFFTs was in Base. Is it still necessary to do this?
- Dominant language
- Julia
- Stars
- 135
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaMath/AbstractFFTs.jl
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JuliaMath/AbstractFFTs.jl#159 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
JuliaMath/AbstractFFTs.jl#147 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
JuliaMath/AbstractFFTs.jl#135 ·
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
JuliaMath/AbstractFFTs.jl#125 · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
JuliaMath/AbstractFFTs.jl#122 · 3 comments ·
All issues in JuliaMath/AbstractFFTs.jl
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
JuliaGenAI/HuggingFaceDatasets.jl#96 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100