Make DefaultQuantile more efficient
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 94
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
The DefaultQuantile op copies the input Iterable into an ArrayList<Double> which is highly inefficient. At minimum, we should use an org.scijava.util.DoubleArray.
As long as we are scrutinizing the performance of DefaultQuantile, let's consider using median of medians or introselect instead. One easy way to go might be to lean on Guava's com.google.common.math.Quantiles for this.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start at the DefaultQuantile op and inspect how it copies the input Iterable into ArrayList. Compare the proposed DoubleArray, median-of-medians, introselect, and Guava Quantiles approaches, then verify that the selected change improves efficiency while preserving quantile behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100