On Sat, Oct 31, 2009 at 10:18 AM, Stefan Behnel <[email protected]> wrote: > > To fix this, I pushed a change that optimises this > > cdef type some_type = ... > obj = some_type.__new__(some_type) >
So it seems that the optimization only works if __new__ is called with just a single arg some_type... but your __new__ optimization will definitely call __cinit__. Do you think that optimizing a many-args __cinit__ is a nonsense? BTW, You did not taken into account __cinit__ special method in your testing... I've tried to add __cinit__ in your testcase with a "print" inside, but I do not know why the test hangs (this is a bit strange, isn't it?)... -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
