You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-42917: Made block stack for frame objects dynamically sizable
This removes the hardcoded block stack size of 20 since typical
functions have far less than 20 nested blocks. When running an empty
program, 256 frame objects get created with an old average size of
420.281 bytes. This change reduces the average size to less than
half: 197.000 bytes on x86_64. The goal is not necessarily to reduce
memory usage, but to make it more likely for stack frames to stay in
L1 cache.
In addition, the maximum of 20 blocks is removed. This should make it
easier to write code generators that produce deeply nested code.
0 commit comments