Allowing extract_array calls to use pre-indexed grid information?

Open
#91 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
r
Domain
performance

Research direction

Start by reading the extract_array and rowAutoGrid entry points, then review the approach described in LTLA/beachmat#20 for pre-indexing dgCMatrix row blocks. A complete change would define a general way for suitable DelayedArray backends to use pre-indexed grid information and demonstrate improved row-based extraction performance.

Written by the indexing model from the issue text.

Description

The recent conversation in theislab/zellkonverter#34 reminded me of some work I did in LTLA/beachmat#20. Briefly, the idea was to speed up row-based block processing of dgCMatrix by performing a single pass over the non-zero elements beforehand to identify the start and end of each row block in each column. This avoids the need for costly per-column binary searches when each row block is extracted in the usual way, and gives a ~10-fold speed-up in row-based processing of dgCMatrixes.

Now I'm wondering whether this approach can be generalized somehow so that other DelayedArray backends can benefit. Perhaps functions like rowAutoGrid() can decorate the grid object with extra information that allows extract_array to efficiently obtain the necessary bits and pieces, if a suitable object like a dgCMatrix is passed?

Happy to give this - or other ideas - a crack with a PR if there is some interest.

Dominant language
R
Stars
29
Forks
12
PR merge metrics
No merged PRs in 30d

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.

More from Bioconductor/DelayedArray

All issues in Bioconductor/DelayedArray

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.