#13304: Very inefficient scalar multiplication on FreeModule_ambient with
somewhat
large rank
------------------------------+---------------------------------------------
Reporter: daniels | Owner: daniels
Type: defect | Status: new
Priority: minor | Milestone: sage-5.3
Component: linear algebra | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
------------------------------+---------------------------------------------
As reported in a [https://groups.google.com/d/topic/sage-support/jlLTyY-
8H8c/discussion thread in sage-support] trivial scalar multiplication in
`FreeModule_ambient` can be extremely slow or lead to out of memory
errors:
{{{
n = 10000
v = vector([0]*n) # ok so far
v2 = v/1 # kaboom
}}}
The problem is that, during coercion, `_an_element_impl()` and in turn
`gen(0)` of `FreeModule_ambient` gets called. The default implementation
of `gen` calls `basis()`, computing the entire standard basis, and then
returns the first basis vector.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13304>
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.