This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Mark.Shannon
Recipients Mark.Shannon
Date 2021-12-02.12:27:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-12-02 12:27:40Mark.Shannonsetrecipients: + Mark.Shannon
2021-12-02 12:27:40Mark.Shannonsetmessageid: <1638448060.39.0.766103367856.issue45963@roundup.psfhosted.org>
2021-12-02 12:27:40Mark.Shannonlinkissue45963 messages
2021-12-02 12:27:40Mark.Shannoncreate