Graphegon / pygraphblas

GraphBLAS for Python
https://graphegon.github.io/pygraphblas/pygraphblas/index.html
Apache License 2.0
343 stars 27 forks source link

Adding Too Slow Compared to Scipy #75

Open turnersr opened 4 years ago

turnersr commented 4 years ago

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.