On Nov 2, 11:25 am, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > :-(, but I have to concede to your logic. The line to change is 148 > of coerce.pxi. Setting this value to 0 will turn them completely off. > Other than numpy, (and the builtin libraries), do we use any other > extension types? If there is a finite list of things for which it > won't work, it would be possible to disable it just for those.
Another possibility is to figure out where in Sage it's safe to use and particularly helpful, and explicitly enable it for those sections of code. And another possibility, which restores the in-place optimization to (some) Cython code but not Python code, is to change Cython so that if it knows the things it's adding/multiplying/etc. are of subtypes of sage.structure.element.Element, then it bypasses PyNumber_Add and calls a method on the objects directly. This method could use the in- place optimization. (Plus, we might gain a tiny bit of speed by skipping PyNumber_Add anyway.) Carl Witty --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---