Are there any other benefits to compressed column format, or is its main purpose just for matrix operations? Because it definitely feels like an unintuitive way to do things.
potato
I really liked that you included how sparse arrays could actually be stored rather than just leave that to be a black box. It made the implementation much more concrete and I found it really interesting the different ways sparse matrices could be stored. I'm curious to find out how the compressed column format helps with matrix calculations.
nouyang
Could someone help explain why compressed column format is fast for actual matrix operations?
dtorresr
If you are using an implementation that involves converting between different data structures depending on the task, when would you know when to convert? Can converting be costly if you find yourself doing it often?
Isaaz
I am also curious about how does compressed column format work
keenan
@dtorresr Yes, you should try to minimize the frequency with which you convert to compressed column format. For instance, you wouldn't want to re-do the conversion each time you do a matrix-vector multiply; better to store the compressed column format and re-use it.
keenan
@nouyang Compressed column format isn't necessarily faster for everything, but it will speed up a lot of very common operations. Consider, for instance, how you might implement matrix-vector multiplication. What would the code look like if using each of these different data structures? How much compute is required, and perhaps more importantly, how cache-friendly is each representation? I.e., are you hopping all over memory, or accessing contiguous blocks? Etc.
Are there any other benefits to compressed column format, or is its main purpose just for matrix operations? Because it definitely feels like an unintuitive way to do things.
I really liked that you included how sparse arrays could actually be stored rather than just leave that to be a black box. It made the implementation much more concrete and I found it really interesting the different ways sparse matrices could be stored. I'm curious to find out how the compressed column format helps with matrix calculations.
Could someone help explain why compressed column format is fast for actual matrix operations?
If you are using an implementation that involves converting between different data structures depending on the task, when would you know when to convert? Can converting be costly if you find yourself doing it often?
I am also curious about how does compressed column format work
@dtorresr Yes, you should try to minimize the frequency with which you convert to compressed column format. For instance, you wouldn't want to re-do the conversion each time you do a matrix-vector multiply; better to store the compressed column format and re-use it.
@nouyang Compressed column format isn't necessarily faster for everything, but it will speed up a lot of very common operations. Consider, for instance, how you might implement matrix-vector multiplication. What would the code look like if using each of these different data structures? How much compute is required, and perhaps more importantly, how cache-friendly is each representation? I.e., are you hopping all over memory, or accessing contiguous blocks? Etc.