imagej / imagej/imagej-ops

Make DefaultQuantile more efficient

Open
#596 1 comment 1 reaction 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.