[New-bugs-announce] [issue13897] Move fields relevant to coroutine/generators out of frame into generator/threadstate
report at bugs.python.org
Sat Jan 28 17:24:47 CET 2012
New submission from Mark Shannon <mark at hotpy.org>:
The frame object has a number of fields which belong to the generator object.
By creating a CoState struct, these fields can be moved to generator/threadstate where they belong.
The interpreter no longer has to swap around exception state whenever generators are entered/exited.
The frame object is made more compact, reducing allocation/deallocation overhead (although benchmarking showed no significant difference)
The attached patch reduces the code base by about 50 LOC overall.
components: Interpreter Core
title: Move fields relevant to coroutine/generators out of frame into generator/threadstate
versions: Python 3.3
Added file: http://bugs.python.org/file24350/coro.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce