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.


> I would think that allocating first and then run a
> constructor N times would be faster than N allocations.

How would you instantiate arrays of classes in a single step?

Stefan

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

Reply via email to