Sturla Molden wrote:
> - When sorting a list, we know refcounts do not change, we just need to
> swap pointers quickly around. We can use PyObject* for this, but not
> object because Cython/Pyrex starts refcounting.
I think that can be implemented as an optimisation. Just write
a,b = b,a
or maybe
l[i], l[j] = l[j], l[i]
in your code and add a tweak to Cython that lets it drop the ref-counting
in this exact case.
Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev