Uh oh!
There was an error while loading. Please reload this page.
gh-102471: convert decimal module to use PyLong_Export API (PEP 757) - #128267
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
commented
Jan 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). |
vstinner
left a comment
There was a problem hiding this comment.
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.
vstinner
commented
Jan 6, 2025
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