pygraphblas icon indicating copy to clipboard operation
pygraphblas copied to clipboard

Adding Too Slow Compared to Scipy

Open turnersr opened this issue 5 years ago • 0 comments

Hello,

I am trying to rewrite the following Sparse Scipy code in GraphBlas:

from scipy.sparse import csc_matrix


G = csc_matrix((50000, 50000))
H = csc_matrix((50000, 50000))

H[0,0] = 3.3

G + H

But I notice a very significant slowdown with the following GraphBlas code.

from pygraphblas import *

Q = Matrix.sparse(FP64, 50000, 50000)

V = Matrix.sparse(FP64, 50000, 50000)

Q[0, 0] = 3.3

C = Q + V

Am I doing something wrong? Thank you for your help. For what it's worth, the @ operation is much faster.

turnersr avatar Nov 05 '20 20:11 turnersr