-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control stack usage in large expressions #88012
Comments
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. |
What is performance impact of this change? I expect that creating a list incrementally can hurt performance, but how much? |
I've not measured performance, as the sort of large literals it would impact are very rare, and the sort of calls it would change are almost non-existent. I'd be surprised if any performance difference could be reliably detected with our current performance tools. This change is an enabler of future optimizations, such as using a contiguous data stack. The impact of those optimizations will swamp any impact of this change, and should be easily measurable. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: