-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Optimise divmod() for all C integer types #6717
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
Conversation
…mod() of C integers.
…espite tree path failures.
… if the type is not defined in the module itself.
|
I picked independent changes into the master branch to unburden this PR. I think it's ready to merge. Sadly, we don't use |
|
Over in pandas, I've discovered that this commit broke some testing we had on our Python 3.13 free threading builds on Windows OS pandas-dev/pandas#61249. I haven't been able to narrow down why this commit broke some tests, but the common denominator is that arithmetic operations with Edit: Here is an code path where we're calling Edit2: Opened #6786 related to this failure |
…neration. See cython#6717 Closes cython#6786
Allow ctuples as return type of optimised builtins and use it for
divmod()of C integers.Also make sure that we prefer function signatures with wider numeric types over those with narrower types if there are multiple alternatives. This helps when calling functions with mixed integer types (e.g. arguments
int, longshould call a function withlong, longrather thanint, int).Supersedes and closes #6520