-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
PyObject_Free is O(N) where N = # of arenas #81210
Comments
Created a PR and assigned myself to this bug. |
Added file arena.py. This adds some code to the OP's original test, to print out build time and teardown time, and display obmalloc stats. You'll need at least 80GB of RAM to run it - I don't have that much. Building the tree may take on the order of an hour, but the time to tear it down is what's interesting here. Apparently 3.7.3 needs more than 4 hours to reclaim the memory. |
master: build time 0:48:53.664428 patched: build time 0:48:08.485639 About 250x speedup! |
Thank you so much, Inada! That's very good to hear :-) |
I had a bit of time and access to a pretty big machine, so I ran the remove-arena-search branch with the same number of iterations, but also 2x and 4x as many. I attach the output in case it is interesting. The timings seem to be growing linearly with the number of strings. The teardown finishes within minutes. |
Thank you, Friedl! I appreciate the extra confirmation - and especially on even bigger test cases :-) |
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: