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

 Replying to [comment:31 nthiery]:
 > Would it make sense as a short term fix to implement now the
 > alternative option mentioned in the documentation of
 > MatrixSpace.full_category_initialisation? After all, having an object
 > whose category is not completely initialized is prone to issues, and
 > it's not unreasonable to have to ask explicitly for it when needed,
 > rather than the converse.

 The problem there is that the person not requiring a fully initialized
 matrix space isn't asking for a matrix space at all: he/she is probably
 just asking for a matrix and is doing that, quite reasonably, via linear
 algebra routines. Those routines *internally* find the need to
 find/construct an appropriate matrix space and these routines need to be
 able to operate both in time critical code where full initialization of a
 never-used object is too expensive and in situations where the result
 needs to be a full member of the sage universe. I suspect it'll be too
 difficult to get the intent of the caller to the location where that
 intent is relevant.

 In cases where the same size matrices end up being created repeatedly,
 ensuring that matrix spaces have a circular reference (most parents do)
 should let them stick around long enough (till next GC) for weak caching
 to be effective.

 In number theoretic code, where one for instance needs to compute a lot of
 characteristic polynomials of same-sized matrices over a lot of distinct
 finite fields, the matrix spaces don't get used/reused at all, so any time
 spent on them is wasted.

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