This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2022-02-01.13:46:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643723188.95.0.726054970964.issue46600@roundup.psfhosted.org>
In-reply-to
Content
stack_overflow-4.py output depending on the compiler and compiler flags.

gcc -O3 (./configure):
---
test_python_call: 11904 calls before crash, stack: 704.1 bytes/call
test_python_iterator: 17460 calls before crash, stack: 480.0 bytes/call
test_python_getitem: 245760 calls before recursion error, stack: 0.2 bytes/call

=> total: 275124 calls, 1184.3 bytes per call
---

It's better than stack memory usage in 2017: https://bugs.python.org/issue30866#msg297826


clang -O3 (./configure CC=clang):
---
test_python_call: 10270 calls before crash, stack: 816.1 bytes/call
test_python_iterator: 14155 calls before crash, stack: 592.0 bytes/call
test_python_getitem: 245760 calls before recursion error, stack: 0.3 bytes/call

=> total: 270185 calls, 1408.4 bytes per call
---

clang allocates a little bit more memory on the stack than gcc.

I didn't try PGO or LTO yet.
History
Date User Action Args
2022-02-01 13:46:29vstinnersetrecipients: + vstinner
2022-02-01 13:46:28vstinnersetmessageid: <1643723188.95.0.726054970964.issue46600@roundup.psfhosted.org>
2022-02-01 13:46:28vstinnerlinkissue46600 messages
2022-02-01 13:46:28vstinnercreate