Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized decompression for specific matrix types #64

Open
gdalle opened this issue Aug 10, 2024 · 1 comment · May be fixed by #139
Open

Optimized decompression for specific matrix types #64

gdalle opened this issue Aug 10, 2024 · 1 comment · May be fixed by #139
Labels
performance Speeding things up

Comments

@gdalle
Copy link
Owner

gdalle commented Aug 10, 2024

At the moment, our only optimized decompression is for SparseMatrixCSC in :direct mode: we store a vector of compressed_indices such that nonzeros(A) = vec(B)[compressed_indices].
We can probably find a similar optimization for :substitution mode.

What do we want to do for other matrix types, like:

It would be rather tiring to find optimal decompression methods for each of these. My proposal (as a first step) would be to always have a SparseMatrixCSC buffer into which we decompress, and then copy the A_buffer::SparseMatrixCSC into A::SomeWeirdMatrix.
Essentially, it's easier to implement fast copy from SparseMatrixCSC than fast decompression.

Related:

@gdalle
Copy link
Owner Author

gdalle commented Aug 12, 2024

Conclusion of our discussion:

  • Keep one decompression for SparseMatrixCSC and one decompression for AbstractMatrix to remain alloc-free in both cases

@gdalle gdalle closed this as completed Aug 12, 2024
@gdalle gdalle reopened this Aug 12, 2024
@gdalle gdalle added wontfix This will not be worked on performance Speeding things up and removed wontfix This will not be worked on labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Speeding things up
Projects
None yet
1 participant