[New-bugs-announce] [issue43846] Control stack usage in large expressions

Mark Shannon report at bugs.python.org
Wed Apr 14 08:09:31 EDT 2021

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

Large literals or function calls with many arguments can consume a lot of stack space.

This will be a problem for any future work to use a contiguous stack for data and possibly eliminate frame objects for most calls.

It is also possible (I haven't measured this) that this large stack consumption is hurting performance now, as it might leak memory by leaving giant frames in the free-list or as a zombie frame.

This fix relatively straightforward. For large literals and argument lists, build them incrementally rather than all at once.

assignee: Mark.Shannon
components: Interpreter Core
messages: 391072
nosy: Mark.Shannon
priority: normal
severity: normal
stage: needs patch
status: open
title: Control stack usage in large expressions
type: performance

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list