[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

STINNER Victor report at bugs.python.org
Wed Feb 2 05:04:49 EST 2022


STINNER Victor <vstinner at python.org> added the comment:

> For example, see _Py_abspath

For functions which are commonly called in Python at runtime, it may be worth it to manually merged large local variables to save a few bytes on the stack when Python is built with -O0. For _Py_abspath(), this function is only called at startup, if I recall correctly, so it should be a big issue in practice.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46600>
_______________________________________


More information about the Python-bugs-list mailing list