#17822: faster matrix integer dense
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.6
      Component:  linear algebra     |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Vincent Delecroix  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vdelecroix/17822                 |  f7e649670dc0ec095b45471a4b8a39e2773a24c5
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 new timings:
 {{{
 sage: M = MatrixSpace(ZZ,3)
 sage: m = M([1,2,3,4,5,6,1,2,-3])
 sage: %timeit m*m
 1000000 loops, best of 3: 1.13 µs per loop
 sage: %timeit m**3
 100000 loops, best of 3: 2.04 µs per loop
 sage: %timeit m**100
 100000 loops, best of 3: 7.71 µs per loop
 sage: %timeit m**-100
 1000 loops, best of 3: 377 µs per loop
 sage: %timeit ~m
 10000 loops, best of 3: 37 µs per loop
 sage: M1 = MatrixSpace(ZZ,4,2)
 sage: m1 = M1(range(8))
 sage: M2 = MatrixSpace(ZZ,3,4)
 sage: m2 = M2(range(12))
 sage: %timeit m2*m1
 100000 loops, best of 3: 4.8 µs per loop
 }}}

 same timings on sage-6.6.beta0:
 {{{
 sage: M = MatrixSpace(ZZ,3)
 sage: m = M([1,2,3,4,5,6,1,2,-3])
 sage: %timeit m*m
 100000 loops, best of 3: 4.72 µs per loop
 sage: %timeit m**3
 100000 loops, best of 3: 10.2 µs per loop
 sage: %timeit m**100
 10000 loops, best of 3: 45.8 µs per loop
 sage: %timeit m**-100
 1000 loops, best of 3: 462 µs per loop
 sage: %timeit ~m
 1000 loops, best of 3: 138 µs per loop
 sage: M1 = MatrixSpace(ZZ,4,2)
 sage: m1 = M1(range(8))
 sage: M2 = MatrixSpace(ZZ,3,4)
 sage: m2 = M2(range(12))
 sage: %timeit m2*m1
 100000 loops, best of 3: 10.7 µs per loop
 }}}

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