John Cremona <john.crem...@gmail.com> writes: > There is a lesson to be learned here, which is in fact very similar to > one which William explained very well recently: beware the Sage > preprocessor which converts every integer it sees to an Integer, which > can have serious performance consequences and is often not necessary!
I've often been quite frustrated by this aspect of the preparser. Not only does it frequently have speed issues, even for trivial things like comparing an Integer to the length of a sequence, it also can cause problems when calling functions from other libraries which expect a python int and can't handle getting an Integer. Moreover, it is so transparent most of the time that it is a surprise to beginners and sometimes even to people who aren't so new. What would be the consequence of having sage use python int's by default? Could sage do the conversion to Integer just when needed? And when is it needed? Is it just for speeding up arithmetic with large integers, or is it also to help with the coercion framework? Or is the main reason so that 1/2 works? I know this has been discussed before, but I think it's worth thinking again about whether defaulting to python int's might be better. Dan -- 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