You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use shared helper function for faster index range checks #120176
The same pattern can be applied in many other places in the code base like in arraymodule.c, mmapmodule.c, bytearrayobject.c, etc.
I'd propose to extract this helper function into a header and start using it in more places for index range checks. internal/pycore_abstract.h seems like it might be a decent place to put this helper in.
I'm happy to make a PR if people think a micro optimisation like this justifies the code churn, but let me know if I'm missing something.
Activity
serhiy-storchaka commentedon Jun 8, 2024
This is a duplicate of #72583. This idea was already rejected.