STINNER Victor <vstin...@python.org> added the comment:
I measured the stack consumption using attached sys_call.patch and stack_overflow-4.py. Using gcc -O3, the stack consumption with PR 28893 is *way better* on the 6 benchmarks (6 ways to call functions), especially: PyObject_CallOneArg(): 624 bytes/call => 528 bytes/call (-96 bytes) PyObject_CallNoArg(): 608 bytes/call => 512 bytes/call (-96 bytes) _PyObject_CallNoArg(): 608 bytes/call => 512 bytes/call (-96 bytes) Python built in release mode with gcc -O3: ./configure && make === ref === $ ./python stack_overflow-4.py test_python_call: 10070 calls before crash, stack: 832 bytes/call test_python_getitem: 16894 calls before crash, stack: 496 bytes/call test_python_iterator: 12773 calls before crash, stack: 656 bytes/call test_callonearg: 13428 calls before crash, stack: 624 bytes/call test_callnoargs: 13779 calls before crash, stack: 608 bytes/call test_callnoargs_inline: 13782 calls before crash, stack: 608 bytes/call => total: 80726 calls, 3824 bytes === PR === $ ./python stack_overflow-4.py test_python_call: 11901 calls before crash, stack: 704 bytes/call test_python_getitem: 18703 calls before crash, stack: 448 bytes/call test_python_iterator: 14961 calls before crash, stack: 560 bytes/call test_callonearg: 15868 calls before crash, stack: 528 bytes/call test_callnoargs: 16366 calls before crash, stack: 512 bytes/call test_callnoargs_inline: 16365 calls before crash, stack: 512 bytes/call => total: 94164 calls, 3264 bytes ---------- Added file: https://bugs.python.org/file50356/stack_overflow-4.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45439> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com