Stefan Behnel wrote:
> Dag Sverre Seljebotn wrote:
>> Stefan Behnel wrote:
>>> Robert Bradshaw wrote:
>>>> We should
>>>> look into making instantiating (cdef) classes faster by default as
>>>> well.
>>> Different topic, but surely worth it (and worth a ticket). It might work
>>> to always use PY_NEW() for instantiation and then generate a separate
>>> (and direct) call to __init__() only if the type defines it.
>> Should one consider allocating arrays of cdef class objects as one big
>> memory block?
> 
> We do not control the allocation, CPython handles that.

OK. I didn't know exactly how fine-grained the CPython API was and 
whether it was possible to run a constructor on already allocated memory 
(like you can do in e.g. C++). It just seemed like that could be one of 
the major bottlenecks.

-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to