#10568: multipying sparse matrices by integers in unnecceraly slow
------------------------------+---------------------------------------------
Reporter: mderickx | Owner: jason, was
Type: enhancement | Status: needs_review
Priority: major | Milestone:
Component: linear algebra | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Changes (by mderickx):
* status: new => needs_review
Comment:
Ok the problem was that I had to cpdef the _lmul_ operator. It's now
dramatically faster as the following shows:
{{{
sage: M=MatrixSpace(QQ,1240,3720,sparse=true)
sage: m=M.random_element(density=4/3720)
sage: set_verbose(2)
sage: time QQ(2)*m
CPU times: user 0.03 s, sys: 0.00 s, total: 0.03 s
Wall time: 0.03 s
1240 x 3720 sparse matrix over Rational Field
}}}
The old code was multiplying sparse matrices as if they were still regular
(dense) matrices, so no wonder it was terribly slow.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10568#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.