Does matrix multiplication (both Mat*Mat, and Mat*Vec) scale with number of non-zeros, or with the size of the matrix? Or some combination of the two.
What about with shape.
For example, I have a 100 x 100 matrix with 100 values in it, or a 1000 x 1000 matrix with 100 values in it.
When squaring these matrices (or multiplying them by similar matrices with similar sparsity), is the first (100x100) going to be faster than the second (1000x1000)? Does it depend on where the values are?
If it is implementation dependent, I am interested in the answer for PETSc.