#17663: clean sparse matrices
-------------------------+-------------------------------------------------
Reporter: | Owner:
vdelecroix | Status: needs_review
Type: | Milestone: sage-6.5
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers: Martin von Gagern
linear algebra | Work issues:
Keywords: | Commit:
Authors: | b52ad708d1190c4b5de75bcbafd4f59c13a5c84b
Vincent Delecroix | Stopgaps:
Report Upstream: N/A |
Branch: |
public/17663 |
Dependencies: |
#17658 |
-------------------------+-------------------------------------------------
Comment (by vdelecroix):
Replying to [comment:18 gagern]:
> Some more comments from reading the latest commit.
> * `if entries is None or not entries` could be shortened to `if not
entries`.
It depends on the school! "my_var is None" is a simple address lookup
while "not my_var" implies a function call. So "my_var is None" is very
fast compared to "not my_var". But I agree that is fighting for micro
seconds that are negligible looking at the rest of the code...
> * `_cmp_backward` might use `if i != j: return i - j` in the first case
as well. Not sure whether that makes much of a difference.
Actually this is what I tried. But if you do that, you end up with some
warning claiming that the comparison routine returns something different
from 0,1,-1!
> One more thing, not related to that last commit.
Indeed, this needs to be fixed. I thought that `MatrixSpace` would have
taken care of that. I will add a commit.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/17663#comment:19>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.