On Sep 25, 2008, at 1:23 PM, Lisandro Dalcin wrote: > On Thu, Sep 25, 2008 at 2:24 PM, Robert Bradshaw > <[EMAIL PROTECTED]> wrote: >> On Sep 25, 2008, at 6:07 AM, Lisandro Dalcin wrote: >> >>> On Wed, Sep 24, 2008 at 11:53 PM, Greg Ewing >>> <[EMAIL PROTECTED]> wrote: >>>> Robert Bradshaw wrote: >>>> >>>>> Specifically, it operates on anything of type type (which includes >>>>> extension classes). >>>> >>>> In that case it should already work on int and float, >>>> as they're known to be types. >>>> >>> >>> Well, by some reason Robert's patch do not work on int, float, >>> slices. >>> It end-ups optimizing cdef classes and some of built-in types. If >>> 'int', 'float', 'slice', etc. are added in 'builtin_types_table' at >>> Cython/Compiler/Builtin.py then they will be optimized. >>> >>> I'll send a patch soon. I just have to run the testsuite to be sure >>> nothing breaks. >> >> Thats' because they were not declared as types, just as ordinary >> objects. >> > > Yes, I see the difference now. So, what should I do? There is a bit of > code duplication here. I'll try to populate all the tables as > appropriate, and let's put in the TODO a unification if that make > sense and it is possible.
Yes, builtin_entries should probably be moved form symtab to Builtins.pyx for consistancy. One could also declare them to have the more specialized type. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
