#11589: faster zero matrix creation
------------------------------+---------------------------------------------
Reporter: malb | Owner: jason, was
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.7.2
Component: linear algebra | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: Martin Albrecht, Simon King
Merged: | Dependencies:
------------------------------+---------------------------------------------
Comment(by SimonKing):
Hi Martin,
I have a guess why the patch isn't as quick as it should be: It is the
line
{{{
return self.__matrix_class(self, 0, coerce=coerce, copy=copy)
}}}
If you pass the value 0, then the matrix is initialised as a diagonal
matrix with 0 on the diagonal -- which means that time is wasted by
initialising the diagonal twice.
Better would be to pass `self, None, coerce=coerce, copy=copy`. I will
change that and then do some tests, concerning the threshold and also
concerning other base rings.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11589#comment:7>
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.