>
> I did think about this... One would then have to find gcd's between
> all pairs of (non-prime) factors which would get expensive very
> quickly compared to a single gcd of the product.

I am not sure this is so clear cut in general.  But since your example
is in a sense the worst possible case, probably no algorithm
can improve on taking gcd's after every step.

> I do have
> to say I am wary of including something (by default at least) that
> can give a 10x speedup in some cases and 1000x slowdown in others.
>
Well there seems to be a misunderstanding.
I want to repeat that I never wanted this to be enabled by default.
I want to give the FractionField factory method an optional parameter
'cache' which when True would return an instance of
FractionField_cache
instead of FractionField_generic. The documentation would explain what
are the benefits and pitfalls of this option. Your example is
perfectly
good for that.

Michel


Michel








--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to