Add PyTuple_FromArray#5990
Conversation
a3f94e0 to
a87cc4e
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
|
It might be possible to reclaim some peformance loss here by making an array of borrowed rather than owned values at the callsites of Alternatively, if this is for RustPython, could gate this path on |
Thanks! Using Borrowed gives some performance back indeed. But it still has some small performance hit (for owned IntoPyObject results).
If the performance hit is too large, I will consider adding support for |
|
I asked about the question of switching entirely for 3.15 at python/cpython#127058 (comment) |
9f2bb0e to
41ef955
Compare
|
I've removed the compat function and made it only available on python 3.15 & RustPython. Because of the slowdown I only actually use it for RustPython. |
|
Thanks! |
Avoids creating tuples using mutation api's.
This will add a additional
Py_INCREF+Py_DECREFon the tuple items, so this may be slower.