#11589: faster zero matrix creation
------------------------------+---------------------------------------------
Reporter: malb | Owner: jason, was
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.7.2
Component: linear algebra | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: Martin Albrecht, Simon King
Merged: | Dependencies:
------------------------------+---------------------------------------------
Changes (by newvalueoldvalue):
* author: => Martin Albrecht, Simon King
Comment:
Timings on my machine:
'''with patch'''
{{{
#!python
sage: for n in (50,500,1000): timeit('A=matrix(GF(2),%d,%d)'%(n,n))
....:
625 loops, best of 3: 104 µs per loop
625 loops, best of 3: 108 µs per loop
625 loops, best of 3: 115 µs per loop
sage: for n in (50,500,1000): timeit('A=matrix(GF(3),%d,%d)'%(n,n))
....:
625 loops, best of 3: 100 µs per loop
625 loops, best of 3: 448 µs per loop
125 loops, best of 3: 1.65 ms per loop
}}}
'''without patch'''
{{{
#!python
sage: for n in (50,500,1000): timeit('A=matrix(GF(2),%d,%d)'%(n,n))
....:
625 loops, best of 3: 97.6 µs per loop
625 loops, best of 3: 108 µs per loop
625 loops, best of 3: 128 µs per loop
sage: for n in (50,500,1000): timeit('A=matrix(GF(3),%d,%d)'%(n,n))
....:
625 loops, best of 3: 94.1 µs per loop
625 loops, best of 3: 502 µs per loop
125 loops, best of 3: 2.48 ms per loop
sage:
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11589#comment:1>
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.