#10568: multipying sparse matrices by integers in unnecceraly slow
------------------------------+---------------------------------------------
Reporter: mderickx | Owner: jason, was
Type: enhancement | Status: new
Priority: major | Milestone:
Component: linear algebra | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by mderickx):
With the patch applied I now get:
{{{
sage: M=MatrixSpace(QQ,1240,3720,sparse=true)
sage: m=M.random_element(density=4/3720)
sage: set_verbose(2)
sage: m._lmul_(2)
verbose 2 (_lmul_) scalar multiplying
verbose 2 (_lmul_) scalar multiplying finished (time = 0.033165)
1240 x 3720 sparse matrix over Rational Field (type 'print m.str()' to see
all of the entries)
sage: time 2*m
CPU times: user 15.97 s, sys: 0.04 s, total: 16.01 s
Wall time: 16.36 s
1240 x 3720 sparse matrix over Rational Field
sage: time m*2
CPU times: user 15.93 s, sys: 0.04 s, total: 15.97 s
Wall time: 16.46 s
1240 x 3720 sparse matrix over Rational Field
}}}
So the newer and faster _lmul_ is there but for some reason it is not
called.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10568#comment:2>
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.