#15104: Special case modn_dense matrix operations to improve performance
-------------------------------------+-------------------------------------
       Reporter:  nbruin             |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.2
      Component:  linear algebra     |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Nils Bruin, Simon  |    Reviewers:
  King                               |  Work issues:  regression in
Report Upstream:  N/A                |  right_kernel_matrix
         Branch:                     |       Commit:
  u/SimonKing/ticket/15104           |  0f008f9266e3ed6fbd67e7f3d357474825bdb160
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by SimonKing):

 At #15792, I have collected some tests that apparently became much slower
 in the past 2 years. I have no idea yet why they became slower.

 Here, I am showcasing the effect of full category initialisation on the
 time needed to create a matrix space.

 First, the current master branch, i.e., no full initialisation. This seems
 to be slower than 2 years ago, but not much.
 {{{
 sage: def test():
 ....:     for i in xrange(10000):
 ....:         MS = MatrixSpace(QQ,i)
 ....:
 sage: %time test()
 CPU times: user 0.93 s, sys: 0.01 s, total: 0.93 s
 Wall time: 0.93 s
 sage: type(MatrixSpace(QQ,8))
 <class 'sage.matrix.matrix_space.MatrixSpace'>
 }}}

 Now, I am repeating it with full category initialisation:
 {{{
 sage: def test():
 ....:     for i in xrange(10000):
 ....:         MS = MatrixSpace(QQ,i)
 ....:
 sage: %time test()
 CPU times: user 1.74 s, sys: 0.00 s, total: 1.74 s
 Wall time: 1.74 s
 sage: type(MatrixSpace(QQ,8))
 <class 'sage.matrix.matrix_space.MatrixSpace_with_category'>
 sage: (1.74-0.93)/0.93
 0.870967741935484
 }}}
 So, the regression "on its origin" would be 87%.

 In other words, Nils, you are right: A tree did fall onto a pothole in the
 street.

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

Reply via email to