-
-
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-102471: convert decimal module to use PyLong_Export API (PEP 757) #128267
gh-102471: convert decimal module to use PyLong_Export API (PEP 757) #128267
Conversation
@vstinner, @serhiy-storchaka, please review. I removed
Benchmark hidden because not significant (1): int(Decimal(1<<3000)) (*) only-qset_i64 - current version. @serhiy-storchaka, if you prefer runtime checks over asserts - I'll cache layout parameters in the decimal module state (though, seems odd for me). |
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. Thanks.
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. I'm a little bit sad that the change makes the code a little bit slower, but I guess that's the price of abstraction.
Merged, thanks. |
For reviewers: in the history included version, where PyLong_Export always set
digits
.Benchmark hidden because not significant (1): Decimal(1<<3000)
benchmark code