gh-144650: support Vectorcall for _decimal.Decimal's - #158207
Open
skirpichev wants to merge 5 commits into
Open
skirpichev wants to merge 5 commits into
skirpichev wants to merge 5 commits into
Conversation
skirpichev
force-pushed
the
decimal-ac/144650
branch
from
September 26, 2026 02:28
325c126 to
a0723f1
Compare
Contributor
|
#157968 may help with the build failures (changes how the assert works which should make it better across module boundaries) |
Member
Author
|
Thanks. The Decimal is only possible candidate being a heap type in the stdlib. That was worked before in skirpichev#18 |
Contributor
|
👍 hopefully will get more of these landed soon :). |
Convert the static types to heap types. Move empty init vectorcall to share with existing no-arg __init__ case. Add support for no-argument vectorcall so the no-arg __init__ cases actually work (rather than adding an arg). Produce the same error string as the PyArg helpers do. The vectorcall types no longer have a C address for the generated `Py_Is` so instead compare the slot function instead. This drops the requirement that a class using vectorcall declare a type object. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry-picked from python#157968)
skirpichev
marked this pull request as ready for review
September 26, 2026 03:41
skirpichev
requested review from
AA-Turner and
erlend-aasland
as code owners
September 26, 2026 03:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This shows almost no effect on "official" pyperformance benchmarks (see python/pyperformance#473):
But on micro-benchmarks:
(Default ./configure options, gcc 14.2)
Details