The difference in speed is because Z[t] uses Flint (fast) while Q[t] uses pari (slower). I would have mentioned that earlier, but was not sure how the difference propogated to the fractions fields.
The patch at #4000 sorts this by using Flint for QQ[t] also, by handling denominators suitably. John On 1 May 2010 11:14, Pierre <pierre.guil...@gmail.com> wrote: > Hi all, > > I have changed the subject to 'partially solved' because i'm guessing > that some people must be as naive as me, and following this thread > without realizing the following simple fact. (It came to me by looking > at the name of the patch we've been discussing). > > Partial solution : work with ZZ['t'].fraction_field() instead of > QQ['t'].fraction_field(). Then it all works very very fast ! > > This deserves to be called a "partial" solution inasmuch as sage > should not behave like this, but from the point of view of a user, > it's pretty satisfactory. Every now and then i'll need to convert some > of my data (direct coercion is not always possible), a minor price to > pay. > > Here's an auxilliary question. I was running the same tests this > morning on a different system. The same phenomenon occured, but it > never took longer than 5 seconds to square an 8x8 random matrix > instead of 17s. The 'slow' system was a 2-year-old macbook with sage > 4.3, the 'fast' system a slightly more recent mac mini with sage > 4.3.2. > > Anyone can explain the difference in speed ? > > thanks all, > Pierre > > -- > 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 > -- 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