New submission from Mark Shannon <m...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue45963>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to