#12923: Comparison of vectors is O(n) even in the simple cases
------------------------------------------+---------------------------------
Reporter: hivert | Owner: jason, was
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.1
Component: linear algebra | Resolution:
Keywords: vector equality days38 | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Florent Hivert | Merged in:
Dependencies: | Stopgaps:
------------------------------------------+---------------------------------
Changes (by hivert):
* status: needs_work => needs_review
Comment:
Replying to [comment:3 tscrim]:
> It works fine for integers, but observe the following:
> {{{
> sage: l = 1000; v1 = vector(ZZ, [0]*l); v2 = vector(QQ, [1]*l)
> }}}
> I can't test any higher because running these tests completely kills my
memory (the first comparison will allocate ~150MB RAM, the second ~450MB
RAM). It only allocates when I call the comparison. Also my memory usage
did not drop when I reassign v1 and v2.
I'd rather to see that as a different problem. The goal of the code here
is to
remove a bunch bug whose result was that the specialized code already
written
wasn't called. I'm not optimizing anything as I don't have a serious use
case
for those specific case, do you ? Note that I didn't made any serious
benchmark either. Comparing vectors with different base rings, which
implies
different internal data structure could be certainly optimized, but I'd
rather
leaving it to a different ticket.
Cheers,
Florent
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12923#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.