On Tuesday 09 October 2007 13:05, Simon King wrote: > Michael wrote: > > > When i take a 4x4 matrix over GF(7) with n=1000001, test function 1 > > > needs 92.50 s CPU time, but test function 2 only needs 1.49 s CPU > > > time! > > > Hence, in that case, MeatAxe (actually a very old version!!) appears > > > to be faster than Sage built with Atlas, by a factor of >60! > > <snip> > > > Sage has so far only optimized the large case, but 2.8.6 (out in a day or > > so) should contain a patch that improves the small case also. > > In fact, the new version is faster -- but not much. 10^6 > multiplications of some 4x4 matrix over GF(7) took about 59 seconds of > CPU time using Sage matrices (disclaimer: It is not clear to me if > Sage 2.8.6 has found my ATLAS BLAS).
The optimizations I did I only applied to dense matrices with integer or rational coefficients. I'd imagine that the same thing needs to be done with matrices over a finite field. Robert's optimization of the coercion is probably much more general than mine and applies to matrices with any type of entry -- this is why you saw an improvement. My improvement was to streamline the creation of new matrix spaces to hold the result (that is, you don't have to create a new matrix space if the matrices are square.) > Meanwhile i learned how to turn MeatAxe matrices into an extension > type 'MTX' for Sage. Apparently there is some overhead in my > implementation (and some functionality is still missing), but 10^6 > multiplications of the same 4x4 matrix over GF(7) only took 4.3 > seconds of CPU time using the MTX extension type. Hmm, that's a pretty big improvement over the SAGE time above. I suspect that we will have to work a lot harder than either of our optimizations have so far. -- Joel --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@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-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---