-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Add _testcapi.stack_pointer() to measure the C stack consumption #75049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In issues bpo-28870, bpo-29227, bpo-29233 and bpo-29234, I worked on reducing the C stack consumption. I now would to add the _testcapi.stack_pointer() that I used to be able to easily measure the stack consumption. Try for example attached stack_overflow-3.py to measure the maximum number of C calls before a C stack overflow. The script also computes the average stack usage per C call for a specific kind of C call. |
Usually we first merge a patch in master and after that cherry-pick it to other branches. |
Right. But in this case, I needed the patch for each branch, to run the test on all branches to write a blog post :-) Here are results (blog post spoiler!): Table showing the C stack consumption in bytes, and the difference compared to ==================== ================ ===== ================ ================ Table showing the number of function calls before a stack overflow, ==================== =================== ====== =================== =================== |
I just published my blog post: "My contributions to CPython during 2017 Q1" See the "Stack consumption" section. |
I added the function to the master branch. I changed my mind. I now consider that the function is no needed in other branches. It can be added manually if someone needs it. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: