#10947: very slow matrix product
---------------------------+------------------------------------------------
Reporter: pang | Owner: tbd
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: performance | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
The following code takes a very long time in Sage 4.4 up to and including
4.6:
{{{
sage: var('t')
sage: curva = vector((sin(2*t), cos(2*t), 0))
sage: M = identity_matrix(RDF,3)
sage: time M*curva
CPU times: user 0.02 s, sys: 0.00 s, total: 0.02 s
Wall time: 0.50 s
(sin(2*t), cos(2*t), 0)
}}}
The times depend on the computer, and decrease on the second call, but it
is consistently, and significatively longer than the time required for:
{{{
sage: time sum(a*b for a,b in zip(curva,M.rows()))
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s
(sin(2*t), cos(2*t), 0)
}}}
The first call is forwarded, I think to maxima. The waiting time is
probably due to waiting for the maxima process. Profile revealed that most
of the time was spent on "select.select".
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10947>
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.