Opened 11 years ago

Last modified 10 years ago

#10628 closed enhancement

initialization of matrices from vectors or list of lists can be way faster — at Initial Version

Reported by: mderickx Owned by: jason, was
Priority: major Milestone: sage-5.0
Component: linear algebra Keywords:
Cc: rbeezer, jason Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

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

Change History (0)

Note: See TracTickets for help on using tickets.