Replies: 1 comment 3 replies
-
This is slow since the indexing operation can be expensive. It might be faster to use a hashmap and create a sparse matrix from that. You need to benchmark, it depends on your problem if it is faster or not |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
First of all, thank you very much for writing this crate. It's awesome. I am still learning Rust (and how to use this crate) and I had a question about the best way to do something.
I am working on performing some information theory calculations where I must increment entries in a 2D sparse matrix. Right now I have a function (see below) that uses
get_mut()
, but there are notes in the docs that it is not very efficient and doing a little profiling shows this is a little slow. Is there a better way to do this?Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions