[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor. Your work on reducing the stack consumption is great. -- ___ Python tracker ___

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: The initial issue has been fixed. With the issue #28870 (msg285169): "The default branch is now as good as Python 3.4, in term of stack consumption, and Python 3.4 was the Python version which used the least stack memory according to my tests." Serhiy: As I w

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-11 Thread STINNER Victor
STINNER Victor added the comment: Full commit message: --- Disable _PyStack_AsTuple() inlining Issue #29234: Inlining _PyStack_AsTuple() into callers increases their stack consumption, Disable inlining to optimize the stack consumption. Add _Py_NO_INLINE: use __attribute__((noinline)) of GCC an

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is a stack usage effect of disabling inlining _PyStack_AsTuple()? Does it impact performance? Should inlining _PyStack_AsDict() be disabled too? Is it worth to extract slow paths of _PyObject_FastCallDict() and _PyObject_FastCallKeywords() into separate

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-10 Thread Steve Dower
Steve Dower added the comment: I'm fairly sure dllexport implies noinline, and it certainly does for the exported function (but maybe PGO will inline it within the module? hard to know). In any case, I agree with keeping it private as it's purely about optimization. Do you have a test that ca

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6478e6d0476f by Victor Stinner in branch 'default': Disable _PyStack_AsTuple() inlining https://hg.python.org/cpython/rev/6478e6d0476f -- nosy: +python-dev ___ Python tracker

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-10 Thread STINNER Victor
STINNER Victor added the comment: noinline_msvs.patch: implement _Py_NO_INLINE for Microsoft Visual Studio #elif defined(_MSC_VER) # define _Py_NO_INLINE __declspec(noinline) I didn't push this change because I don't have access to a Windows VM yet. @Steve: Does noinline_msvs.patch look good

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-10 Thread STINNER Victor
New submission from STINNER Victor: While working on the issue #28870, I noticed that _PyStack_AsTuple() is inlined. Compared to Python 3.5 which didn't have this function, it seems like _PyStack_AsTuple() is responsible for an increase of the stack consumption. -- components: Interpre