[Cython] local variable handling in generators
Vitja Makarov
vitja.makarov at gmail.com
Mon May 23 21:29:21 CEST 2011
2011/5/23 Robert Bradshaw <robertwb at math.washington.edu>:
>>
>> Then again, "del x" would be a more obvious way to spell this ...
>
> And then setting it to NULL would actually be correct.
>
That is already done ;) But usually you wouldn't use del statement in your code.
> In any case, I'm -1 to deleting references once their no longer used,
> we must wait 'till the end of the function, and I'm not sure the
> savings would be that great either.
>
Ok. Example with char * makes me think that this is not a good idea.
> In terms of packing/unpacking the variables onto the local C stack,
> until we have live variable analysis (and even then) it may still be
> more expensive in some cases than just leaving it there, right?
>
We can try, that isn't hard to implement and compare.
--
vitja.
More information about the cython-devel
mailing list