Author vstinner
Recipients vstinner
Date 2021-10-13.22:03:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634162630.74.0.984408752073.issue45439@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-10-13 22:03:50vstinnersetrecipients: + vstinner
2021-10-13 22:03:50vstinnersetmessageid: <1634162630.74.0.984408752073.issue45439@roundup.psfhosted.org>
2021-10-13 22:03:50vstinnerlinkissue45439 messages
2021-10-13 22:03:50vstinnercreate