#10947: very slow matrix product
-------------------------------+-------------------
Reporter: pang | Owner: tbd
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: performance | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-------------------------------+-------------------
Comment (by mmezzarobba):
Still true in 6.1:
{{{
sage: sage: var('t')
t
sage: sage: curva = vector((sin(2*t), cos(2*t), 0))
sage: sage: M = identity_matrix(RDF,3)
sage: %time M*curva
CPU times: user 0.72 s, sys: 0.02 s, total: 0.74 s
Wall time: 0.74 s
(sin(2*t), cos(2*t), 0)
sage: %timeit M*curva
100 loops, best of 3: 3.69 ms per loop
sage:
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)
sage: %timeit sum(a*b for a,b in zip(curva,M.rows()))
1000 loops, best of 3: 279 us per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/10947#comment:1>
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/groups/opt_out.