#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):

 The difference seems to be the category initialisation of the matrix
 space:
 {{{
 sage: M=matrix(GF(5),6,6,range(36))
 sage: MS = M.parent()
 sage: %timeit M.right_kernel_matrix(basis='computed')
 1000 loops, best of 3: 377 us per loop
 sage: MS.full_category_initialisation()
 sage: %timeit M.right_kernel_matrix(basis='computed')
 10000 loops, best of 3: 190 us per loop
 }}}

 There is a reason why the category of a matrix space is not fully
 initialised by default. So, making category initialisation the new default
 would be bad, IMHO.

 First, we should try to understand why apparently the
 `right_kernel_matrix` operation in the master branch do cache the
 category, while the ticket branch doesn't.

 Then we should identify some operations that ''should'' trigger a full
 category initialisation.

 In principle, creating a strong cache for vector space categories would
 fix the regression; in a new sage session:
 {{{
 sage: M=matrix(GF(5),6,6,range(36))
 sage: C = VectorSpaces(GF(5))
 sage: %timeit M.right_kernel_matrix(basis='computed')
 10000 loops, best of 3: 186 us per loop
 }}}
 But this would be prone to create memory leaks that we have previously
 been fixing.

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