STINNER Victor added the comment: pyobject_fastcall-2.patch: More complete changes. Sorry, the patch also contains unrelated refactoring! It's a more advanced implementation which tries to reduce the depth of the C backtrace. For example, _PyObject_FastCall() is now inlined manually in _PyObject_FastCallDict(). PyObject_Call() is also rewritten. If the overall approach is validated, I will rewriten the patch differently to limit changes, or push some changes in multiple commits.
Results of testcapi_stacksize.patch + stack_overflow_28870-sp.py (from issue #28870). Reference: haypo@smithers$ ../default-ref/python stack_overflow_28870-sp.py test_python_call: 8586 calls before crash, stack: 976 bytes/call test_python_getitem: 9188 calls before crash, stack: 912 bytes/call test_python_iterator: 7936 calls before crash, stack: 1056 bytes/call => total: 25710 calls, 2944 bytes Patch: haypo@smithers$ ./python stack_overflow_28870-sp.py test_python_call: 9883 calls before crash, stack: 848 bytes/call (-128 B) test_python_getitem: 10476 calls before crash, stack: 800 bytes/call (- 112 B) test_python_iterator: 8878 calls before crash, stack: 944 bytes/call (- 112 B) => total: 29237 calls (+3616), 2592 bytes (- 352 B) ---------- Added file: http://bugs.python.org/file46553/pyobject_fastcall-2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29465> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com