Conversation
|
It looks like these macros are only defined in https://github.com/python/cpython/blob/main/Include/cpython/tupleobject.h, i.e. for the unlimited abi. So I'd vote for doing the same for our If there's lots of places in the code where this happens, can always add tiny |
They were already defined, but not used so far.
|
So far, these were each only used in one place, so I went and added the conditional there. |
davidhewitt
left a comment
There was a problem hiding this comment.
LGTM, nice one!
FWIW, I get ~2% speedup with tuple_get_item benchmark on this branch, and ~8% speedup on a tuple_new benchmark I'll push in a minute.
They were already defined, but not used so far. For abi3 they now forward
to the C functions.
Question: should these be defined at all for abi3, or should I add the conditional code in the
PyTupleimpl?