#10947: very slow matrix product
----------------------------+----------------------------------------------
       Reporter:  pang      |        Owner:  tbd
           Type:            |       Status:  needs_review
  enhancement               |    Milestone:  sage-duplicate/invalid/wontfix
       Priority:  minor     |   Resolution:
      Component:            |    Merged in:
  performance               |    Reviewers:
       Keywords:            |  Work issues:
        Authors:            |       Commit:
Report Upstream:  N/A       |     Stopgaps:
         Branch:            |
   Dependencies:            |
----------------------------+----------------------------------------------
Changes (by aapitzsch):

 * status:  new => needs_review
 * milestone:   => sage-duplicate/invalid/wontfix


Comment:

 {{{
 sage: var('t')
 sage: curva = vector((sin(2*t), cos(2*t), 0))
 sage: M = identity_matrix(RDF,3)
 sage: %timeit M*curva
 1000 loops, best of 3: 478 µs per loop
 sage: %timeit sum(a*b for a,b in zip(curva,M.rows()))
 1000 loops, best of 3: 321 µs per loop
 }}}
 after a restart of sage:
 {{{
 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 6.67 ms, sys: 0 ns, total: 6.67 ms
 Wall time: 4.67 ms
 (sin(2*t), cos(2*t), 0)
 sage: %time sum(a*b for a,b in zip(curva,M.rows()))
 CPU times: user 3.33 ms, sys: 0 ns, total: 3.33 ms
 Wall time: 3.77 ms
 (sin(2*t), cos(2*t), 0)
 }}}
 So no significant difference here. Maybe because of an SSD.

--
Ticket URL: <http://trac.sagemath.org/ticket/10947#comment:2>
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.

Reply via email to