[New-bugs-announce] [issue45963] Embed interpreter frame in generator.
Mark Shannon
report at bugs.python.org
Thu Dec 2 07:27:40 EST 2021
New submission from Mark Shannon <mark at hotpy.org>:
Currently, the InterpreterFrame for a generator is allocated on the heap separately from the generator.
This means that 2 allocations are needed to create a generator, and an extra indirection is needed to get from the generator to the frame.
By embedding the frame in the generator, we only need one alloaction, we save an indirection *and* the code gets simpler: transferring the frame from generator to frame object is just a single memcpy.
----------
assignee: Mark.Shannon
components: Interpreter Core
messages: 407526
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Embed interpreter frame in generator.
type: performance
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45963>
_______________________________________
More information about the New-bugs-announce
mailing list