On 5/16/07, Michel <[EMAIL PROTECTED]> wrote: > > Consider > > sage: x,y,z=QQ['x','y','z'].gens() > sage: u,v,w=W['u','v','w'].gens()
Syntax error -- W is not defined. What is W? > sage: %timeit ((x+y+z)**3)(1/y,y,y**100) > 10 loops, best of 3: 752 ms per loop <=== look here! > sage: %timeit ((u+v+w)**3)(1/v,v,v**100) > 10 loops, best of 3: 48.2 ms per loop <=== look here! > > Conclusion: rational functions over the rationals are unusably slow at > this time. > I even know what the reason is. Rational functions over W do not > support reduce so it > is not called during the intermediate computations which happens to be > a blessing. > > William: I know you can easily fix this yourself. If you are too busy > would you be interested in a patch? I think this kind of janitorial > work is important to improve the predictability > of sage behaviour. It's not at all clear to me without further discussion and benchmarking what the right optimization is so that rational functions over fields are sufficiently fast. I definitely wouldn't make any changes to this without some discussion. Basically, are you suggesting that one not call reduce until, e.g., printing? Or at least until some sort of operations that require the thing be reduced? When do you want to call reduce? I definitely don't dispute that rational functions are slow. No real attempt has been made to optimize them, and I greatly welcome any such attempts and any discussion along these lines. -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.org --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---