Matrix optimizations
Open
Nobody has claimed this yet.
on hold
- Dominant language
- Python
- Stars
- 140
- Forks
- 10
- Avg merge
- 18h 17m
- Merged PRs (30d)
- 2
Description
- Add to the benchmark suite: problems with mild and severe row restrictions, problems with mild and severe column restrictions.
- Add exceptions everywhere for when cols is None or rows is None.
- Add output array as an optional argument to dot/transpose_dot/sandwich. This will be useful for avoiding unnecessary allocations. It will solve https://github.com/Quantco/quantcore.matrix/issues/25 and will enable some improvements in speed, particularly for SplitMatrix.dot which is allocating a new output array for each submatrix. After the optimization, SplitMatrix will only need one output array instead of len(matrices). Relatedly (complete now): flatironinstitute/sparse_dot#9
- Cythonize row and column limiting for categorical sandwiches (currently just have rows)
- Think about reducing duplication across different implementations that differ based on whether rows or cols are restricted: https://github.com/Quantco/quantcore.matrix/issues/5 -- is there some inspiration that would come from thinking about the restrictions as sparse matrices?
Contributor guide
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 with the benchmark suite and the dot, transpose_dot, and sandwich entry points mentioned in the issue. Trace SplitMatrix.dot and the categorical sandwich implementations, then review the linked issues for context on output-array allocation and row or column restrictions. Done requires covering the listed benchmark cases and completing the selected optimization work without leaving the related restriction behavior unresolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100