#20470: Conversion of sparse to dense matrices over F2 is unspeakably slow
-------------------------------------------------+-------------------------
       Reporter:  kedlaya                        |        Owner:
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-7.2
      Component:  linear algebra                 |   Resolution:
       Keywords:  sparse matrices, dense         |    Merged in:
  matrices                                       |    Reviewers:
        Authors:                                 |  Work issues:
Report Upstream:  N/A                            |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Comment (by kedlaya):

 Replying to [comment:1 jhpalmieri]:
 > How much time does
 > {{{
 > time sT2F2a = sT2F2.dense_matrix()
 > }}}
 > take? I tried with a smaller matrix, and it's much faster than plugging
 the matrix into the appropriate matrix space. (That doesn't mean that
 there isn't a problem, rather that someone could possibly speed up `M2(
 sparse_matrix )` by calling the `dense_matrix()` method, under suitable
 circumstances.)

 That is indeed much faster:
 {{{
 sage: time sT2F2b = sT2F2.dense_matrix()
 CPU times: user 318 ms, sys: 47 ms, total: 365 ms
 Wall time: 365 ms
 sage: sT2F2a == sT2F2b
 True
 }}}

 I guess that means this is easy to fix: the constructor for dense matrices
 (over any base), upon receiving a sparse matrix as input, should simply
 call the `dense_matrix()` method.

--
Ticket URL: <http://trac.sagemath.org/ticket/20470#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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to