[issue42917] Block stack size for frame objects should be dynamically sizable

Thomas Anderson report at bugs.python.org
Tue Jan 12 20:54:09 EST 2021


New submission from Thomas Anderson <tomkpz at gmail.com>:

Currently the block stack size is hardcoded to 20.  Similar to how the value stack is dynamically sizable, we should make the block stack dynamically sizable.  This will reduce space on average (since the typical number of blocks for a function is well below 20) and allow code generators to generate code with more deep nesting.  Note: the motivation is not necessarily to reduce memory usage, but to make L1 cache misses less likely for stack objects.

----------
components: Interpreter Core
messages: 384991
nosy: tomkpz
priority: normal
severity: normal
status: open
title: Block stack size for frame objects should be dynamically sizable
type: enhancement
versions: Python 3.10

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


More information about the Python-bugs-list mailing list