Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.4k
gh-102471: convert decimal module to use PyLong_Export API (PEP 757)#128267
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
skirpichev commentedJan 5, 2025
@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). |
serhiy-storchaka left a comment
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.
vstinner left a comment
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.
879d287 intopython:mainUh oh!
There was an error while loading.Please reload this page.
vstinner commentedJan 6, 2025
Merged, thanks. |
Uh oh!
There was an error while loading.Please reload this page.
For reviewers: in the history included version, where PyLong_Export always set
digits.Benchmark hidden because not significant (1): Decimal(1<<3000)
benchmark code