[New-bugs-announce] [issue44032] Store locals and evaluation stack should be stored in a contiguous, per-thread stack

Mark Shannon report at bugs.python.org
Tue May 4 10:54:31 EDT 2021


New submission from Mark Shannon <mark at hotpy.org>:

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.

----------
assignee: Mark.Shannon
components: Interpreter Core
messages: 392906
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Store locals and evaluation stack should be stored in a contiguous, per-thread stack
type: performance

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44032>
_______________________________________


More information about the New-bugs-announce mailing list