Hi Martin, On 12 Jul., 19:48, Martin Albrecht <martinralbre...@googlemail.com> wrote: > As far as I know it's the fastest implementation for medium size primes (16 > bits or so). For very small primes one can do better
But actually linbox is already much faster over GF(3) than what is currently done in Sage. > It's a shame we are not using the libraries we ship to full potential but so > far no one stepped up (me included) to fix this situation. OK, but how much work would be needed? It appears to me that there is only very little overhead in calling the linbox routines (via sage.libs.linbox.linbox), since the data of a Matrix_modn_dense is already stored in the same format used by linbox (namely mod_int **). In particular, I wounder about your statement that the memory consumption would increase. Is that because of internal linbox computations? Here is how linbox is wrapped (see sage.matrix.matrix_modn_dense.Matrix_modn_dense._multiply_linbox): ... self._init_linbox() sig_on() linbox.matrix_matrix_multiply(ans._matrix, B._matrix, B._nrows, B._ncols) sig_off() self._init_linbox() seems rather light-weight, and linbox.matrix_multiply is also a very thin wrapper of the linbox routines. Similarly, one proceeds with other routines (computing echelon form and so on) Actually I think it would even be easy enough to call the linbox routines directly (without using the sage.libs.linbox.linbox wrapper, thus avoiding all overhead). Since I need fast matrix arithmetics over finite fields, I have some motivation to rewrite _mul_ accordingly. But one question: Can linbox deal with non-prime finite fields? Cheers, Simon -- 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