Hi Victor, On Sat, Nov 17, 2012 at 2:13 AM, Victor Stinner <victor.stin...@gmail.com> wrote: > The major drawback of the register approach (at least of my implementation) > is that it changes the lifetime of objects. Newly created objects are only > "destroyed" at the exit of the function, whereas the stack-based VM destroys > "immediatly" objects (thanks to the reference counter). PyPy has similar > issues with its different garbage collector.
That is not strictly correct. PyPy, Jython and IronPython have non-immediate destructors, but as far as I can tell they all avoid to keep objects alive for an unbounded amount of time. This important difference is visible if the function calls other code that takes a long while to run: in your approach, the objects created by the function itself will stay alive for the whole duration, while the other interpreters will all release them soon after they are not referenced any more --- not instantly like CPython but still soon. A bientôt, Armin. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com