Hi, Dag Sverre Seljebotn wrote: > Stefan Behnel wrote: >> What about code like this: >> >> def test(a): >> cdef int c >> if a: >> c = 1 >> if not a: >> c = 2 >> >> How would you know what is a "first assignment" here? And what would you gain >> from your ref-counting optimisation in this case? > > As for the example, it is a "best-effort" thing. If no assignments are > flagged as first, then the optimization just doesn't happen, which is > the likely outcome of your example.
Then what exactly is your "ref-counting optimisation" doing? Can you give me a code example? Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
