-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
gh-100240: Use a consistent implementation for freelists #121934
Conversation
This combines and updates our freelist handling to use a consistent implementation. Objects in the freelist are linked together using the first word of memory block. If configured with freelists disabled, these operations are essentially no-ops.
I'm putting this up for discussion and feedback. @markshannon, this doesn't do all the things listed in the issue -- I haven't In my limited testing, I haven't seen a significant performance difference. |
Perfomance is in the noise but doesn't look like it's any worse. |
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.
Very nice. +290 −700
had me sold 🙂
A lot of compiler warnings, but should be fixable with one cast in the _Py_FREELIST_SIZE
macro.
Consider it approved once the macro is fixed.
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.
Awesome!
Consider it approved once the macro is fixed.
Same opinion :)
Co-authored-by: Mark Shannon <mark@hotpy.org>
!buildbot AMD64 Ubuntu NoGIL Refleaks |
🤖 New build scheduled with the buildbot fleet by @colesbury for commit aa8e4d5 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
This combines and updates our freelist handling to use a consistent implementation. Objects in the freelist are linked together using the first word of memory block.
When Python is configured to build without freelists, these operations are essentially no-ops.