The method smith_form() for matrices over ZZ uses  pari's matsnf() but is
vastly slower.  Compare these:

sage: M=MatrixSpace(ZZ,1000,5).random_element()
sage: %timeit S=M.smith_form(transformation=True)
1 loop, best of 3: 2.57 s per loop
sage: pM=pari(M)
sage: %timeit S=pM.matsnf(1)
10 loops, best of 3: 49.5 ms per loop

That's a factor of 50.  There's something to be done in the interface
because pari's convention is opposite to Sage's so one has to reverse the
order of rows/columns in the output from pari, but still...

John

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to