Hi,

I'm interested in multiplying smallish matrices over Z with huge  
entries.

On my machine, sage can multiply 3000000-bit integers in about 0.14s,  
and adding integers of that size takes about 1/1000 of the time:

sage: x = ZZ.random_element(2^3000000)
sage: y = ZZ.random_element(2^3000000)
sage: timeit z = x * y
10 loops, best of 3: 141 ms per loop
sage: timeit z = x + y
10000 loops, best of 3: 152 µs per loop

So clearly for matrix multiply, we want to Strassen all the way to  
the bottom.

But look at this:

sage: M1 = matrix(8, 8, [ZZ.random_element(2^3000000) for i in range 
(64)])
sage: M2 = matrix(8, 8, [ZZ.random_element(2^3000000) for i in range 
(64)])
sage: time M3 = M1 * M2
CPU times: user 69.43 s, sys: 2.29 s, total: 71.72 s
Wall time: 71.76

By my reckoning, it should only have to do 7*7*7 multiplies, which  
should take < 50s. It looks like it's really doing 8*8*8 multiplies.

david


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to