Hi Simon,

You have 100x100 matrices in both cases, the same as in my example.

No unfortunately I ended up making a mistake when I was moving code
between sage and my email client.

But what you do here is to use a different number of loops in the
"timeit" function -- you only make 100 runs, and that is not reliable
timing.
In fact, that is why I chose number=10000. The default would be 625,
but even with 625 runs I observed huge differences in the timings.


I had tried to up the number of loops my main issue is that the inner
part of the loop is taking about half a second and so i didn't want to
set the number too high.

Having another go with 625 loops gives me:

sage: MS = MatrixSpace(GF(3),10000,10000)
sage: M = Matrix_modn_dense(MS, None,True,True)
sage: timeit("M = Matrix_modn_dense(MS, None,True,True)",
number=625)
625 loops, best of 3: 374 ms per loop
sage: timeit("N = copy(M)", number=625)
100 loops, best of 3: 401 ms per loop

sage: MS = MatrixSpace(GF(3),100,100)
sage: M = Matrix_modn_dense(MS, None,True,True)
sage: timeit("M = Matrix_modn_dense(MS, None,True,True)",
number=625)
625 loops, best of 3: 19 µs per loop
sage: timeit("N = copy(M)", number=625)
625 loops, best of 3: 16.2 µs per loop




Cheers,
Simon


Thanks for your comments,

Robert


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to