-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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-104787: use bitfields in _asyncio
#104788
Conversation
🤖 New build scheduled with the buildbot fleet by @kumaraditya303 for commit a8d96e0 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
9% memory win per task object is great! |
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.
LGTM, though using char
instead of bitfields would also work, and possibly feel less fragile.
@kumaraditya303 How do you want to proceed here? |
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.
LGTM, except I'd like to see a comment about the need for various small fields to be at the end of the common struct or at the beginning of the specific struct.
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.
(A more appropriate term would be "contiguous".)
Yes that's what I was looking for but late so didn't came to mind :) |
asyncio.Task
and others #104787This reduces size of
asyncio.Task
from176
to160
bytes.