-
-
Notifications
You must be signed in to change notification settings - Fork 198
Add additional gc benchmark with pickletools (#437) #438
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
base: main
Are you sure you want to change the base?
Conversation
These tests (and the PR) has N = 1'000'000. The downside is that running the benchmark (with Python 3.14) takes almost 10 minutes. I could reduce the size of the instance to lower the overall running time, but it seems like the garbage collector bug doesn't "kick in" until we reach a certain size. With N = 100'000, the slowdown is not as noticable:
|
pyperformance/data-files/benchmarks/bm_pickle_opt/run_benchmark.py
Outdated
Show resolved
Hide resolved
pyperformance/data-files/benchmarks/bm_pickle_opt/run_benchmark.py
Outdated
Show resolved
Hide resolved
pyperformance/data-files/benchmarks/bm_pickle_opt/run_benchmark.py
Outdated
Show resolved
Hide resolved
|
@sergey-miryanov Thanks for the review. I have fixed all issues you pointed out. |
|
@sergey-miryanov Something strange happens here. Even though I use the context manager ( I am not able to reproduce this behavior when not running with It sounds like a bug, but I can't tell where. |
sergey-miryanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me.
|
@pgdr Thanks! It is up to |
Adds a benchmark reproducing the Python 3.14 garbage collector regression described in cpython/#140175.
This real-world case uses
pickletoolsto demonstrate the performance issue.Fixes #437.