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
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:
assignee='https://github.com/markshannon'closed_at=<Date2021-04-21.09:23:59.159>created_at=<Date2021-04-14.12:09:31.468>labels= ['interpreter-core', 'performance']
title='Control stack usage in large expressions'updated_at=<Date2021-04-21.09:23:59.158>user='https://github.com/markshannon'
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.
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: