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

Reply via email to