Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Good questions Josh!

The size of the python binary has been increased from 17494944 bytes (17085 
KiB) to 17657112 bytes (17243 KiB) -- by 1%.

I think that this change can not increase memory consumption, because the new 
code does not use the heap (the old code can allocate additional memory 
dynamically).

As for using the stack memory, it is not so clear. On one side, the new code 
allocates an array on the stack for references to all parameters, and this 
memory is left in use until you return from the function. On other side, the 
old code allocates a lot of variables and static-sized buffers, and creates 
several function frames, but this memory is released after the end of arguments 
parsing. I think that for non-recursive functions the new code has smaller 
stack memory consumption (while the function has less than several tens of 
parameters), but for recursive functions it can increase stack memory 
consumption. Although I do not know whether any of affected functions is 
recursive.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36127>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to