Skip to content

Instantly share code, notes, and snippets.

@mkolod
Last active August 28, 2019 17:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkolod/27e5ca3839bd2f22af8ebce45926262b to your computer and use it in GitHub Desktop.
Save mkolod/27e5ca3839bd2f22af8ebce45926262b to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mkolod
Copy link
Author

mkolod commented Aug 28, 2019

We can see that for a matrix that's only 75% sparse, CSR saves hardly any memory, and is more costly computationally. Typically, matrices have to be over 99% sparse (preferably 99.9%) for a sparse representation to be more computationally performant. The requirement for substantial memory savings are a bit less stringent, but 99%+ sparsity is a good general rule of thumb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment