#10628: initialization of matrices from vectors or list of lists can be way 
faster
------------------------------+---------------------------------------------
   Reporter:  mderickx        |          Owner:  jason, was                 
       Type:  enhancement     |         Status:  needs_review               
   Priority:  major           |      Milestone:  sage-4.7.2                 
  Component:  linear algebra  |       Keywords:                             
Work_issues:                  |       Upstream:  N/A                        
   Reviewer:  Simon King      |         Author:  Maarten Derickx, Simon King
     Merged:                  |   Dependencies:                             
------------------------------+---------------------------------------------
Changes (by SimonKing):

  * reviewer:  => Simon King


Old description:

> 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
> }}}

New description:

 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
 }}}

 Apply both patches.

--

Comment:

 All long tests both in devel/sage/sage and devel/sage/doc pass. From that
 point of view, and since it brings quite a speed-up, I can give the first
 patch a positive review. I hope that someone else can review my patch as
 well.

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