On Tue, Dec 21, 2010 at 4:16 AM, Volker Braun <[email protected]> wrote: >> No, it's because your loop is over 10000 rather than 1000. > > Sharp eyes! :) > So, to summarize, with the improved Cython one should always use isinstance > as it will be optimized to be at least as fast.
Yes, as long as the rhs is known by the compiler to be a type (extension or built-in). > I guess we should remove the > PY_TYPE_CHECK macro from Sage altogether and replace every occurrence with > isinstance? Exactly. However, I just found a compiler crash with isinstance(x, <type>t), so we should wait for the next Cython to go in before doing this. There's a lot of cruft from when Cython just wasn't as good as it is now that's still being used. - Robert -- 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-support URL: http://www.sagemath.org
