I posted a patch at http://trac.sagemath.org/14627 (needs review)

With the patch there is no measurable performance difference between setA 
and setB

On Monday, May 20, 2013 8:04:14 PM UTC+1, Stefan wrote:
>
> cpdef setA(A, X, V, m):
>     AA = <Matrix> A
>     for i in xrange(m):
>         AA.set_unsafe(X[i][0], X[i][1], AA.get_unsafe(X[i][0], X[i][1]) + 
> V[i])
>         
> cpdef setB(B, X, V, m):
>     for i in xrange(m):
>         B[X[i][0]][X[i][1]] = B[X[i][0]][X[i][1]] + V[i]
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to