> I vote +1 to this idea, because it is more modular.  Does this idea
> only make sense over division rings?  Because it is sometimes nice to
> do integer arithmetic and have everything factored, as well.
>
> I will referee such a patch, if needed.

Hi,

I would very much prefer the patch to be reviewed as is. Substitution
of
fraction field elements into rational functions is important for
algebraic
geometry (that's how I found this problem) and this patch speeds it up
exponentially.
So the patch does not attack an abstract problem but a *real* problem.
I do not deny
that things can probably optimized  further (e.g. by rewriting
fraction_field_element_cache.py
 in pyrex, removing the overhead python<->pyrex) but
it would be useful to have some indication that I am not losing my
time doing this.
Note that for now my patch does not touch any other parts of sage so
it does not require
any big design decisions.

>Does this idea
>only make sense over division rings?  Because it is sometimes nice to
>do integer arithmetic and have everything factored, as well.

The factor cache works of course for non-fields. There is not much
point
taking the fraction field of a field, is there:-) Naturally you can
use it for integers but it would
probably be very slow since integer arithmetic is already extremely
fast.
It is really meant for rings for which no specialized arithmetic is
available.

Michel






--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to