#10628: initialization of matrices from vectors or list of lists can be way 
faster
------------------------------+---------------------------------------------
   Reporter:  mderickx        |       Owner:  jason, was
       Type:  enhancement     |      Status:  new       
   Priority:  minor           |   Milestone:            
  Component:  linear algebra  |    Keywords:            
     Author:                  |    Upstream:  N/A       
   Reviewer:                  |      Merged:            
Work_issues:                  |  
------------------------------+---------------------------------------------
 This is demonstrated by the code below:
 {{{
 sage: M=MatrixSpace(GF(46337),400)
 sage: m=M.random_element()
 sage: m1=m.columns()
 sage: time M(m1)
 CPU times: user 3.06 s, sys: 0.44 s, total: 3.49 s
 Wall time: 3.70 s
 400 x 400 dense matrix over Finite Field of size 46337
 sage: x=[]
 sage: time map(x.extend,m1)
 CPU times: user 0.81 s, sys: 0.02 s, total: 0.83 s
 sage: time M(x)
 CPU times: user 0.01 s, sys: 0.00 s, total: 0.01 s
 Wall time: 0.01 s
 400 x 400 dense matrix over Finite Field of size 46337
 sage: M(x)==M(m1)
 True
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10628>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to