[issue43574] Regression in overallocation for literal list initialization in v3.9+

2021-04-03 Thread Chad Netzer
Chad Netzer added the comment: For bpo-43574, my initial plan was to change list_resize() so that it wouldn't overallocate empty lists that were resized to be bigger, thus restoring the overallocation behavior for list-literals to be like that of earlier Python releases. However

[issue43574] Regression in overallocation for literal list initialization in v3.9+

2021-03-20 Thread Chad Netzer
Change by Chad Netzer : -- keywords: +patch pull_requests: +23712 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24954 ___ Python tracker <https://bugs.python.org/issu

[issue43574] Regression in overallocation for literal list initialization in v3.9+

2021-03-20 Thread Chad Netzer
New submission from Chad Netzer : In Python v3.9+ there was a regression in the amount of used memory for list-literals, due to switching to using list_extend() to allocate memory for the new list to accomodate the literal elements. Example, in Python v3.8.x (and before): ``` $ python38 Python