One possible downside I see is that copying a Python list to a std::vector<PyObject*>
would involve two copies – one for the temporary tuple, and another to the vector. (For those not familiar with std::vector
: it’s a resizable array much like a CPython list).
I don’t know if that’s a use case worth optimizing for.
OTOH, I also don’t know if zero-copy for tuples is worth it, since vectorcall might replace most uses of large tuples.