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-05-04.14:54:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620140071.36.0.488434643792.issue44032@roundup.psfhosted.org>
In-reply-to
Content
Currently, the local variables (inc. cell and free vars) for functions and the evaluation stack are kept in per-activation chunks in the frame object. This is not a good design for modern hardware.
The local variables and stack are amongst the hottest memory in the VM and should be stored in a contiguous stack in memory.

Allocating a per-thread stack would improve memory locality considerably, and pave the way to allocating heap objects for function activations lazily, only when needed for debugging and introspection.

Generators would still need heap allocated locals and stack, but that would be no worse than currently.
History
Date User Action Args
2021-05-04 14:54:31Mark.Shannonsetrecipients: + Mark.Shannon
2021-05-04 14:54:31Mark.Shannonsetmessageid: <1620140071.36.0.488434643792.issue44032@roundup.psfhosted.org>
2021-05-04 14:54:31Mark.Shannonlinkissue44032 messages
2021-05-04 14:54:31Mark.Shannoncreate