STINNER Victor <vstin...@redhat.com> added the comment:

> Once I had wrote a similar patch that adds PyTuple_FromArray, but never 
> published it because I did not found enough use cases for this function.  
> Although I considered using it only for removing some code duplication, but 
> Sergey shown that it can be used for small performance boost in some special 
> cases. I am still not sure, but this argument makes this change a tiny bit 
> more attractive. Leave this on Raymond.

The micro-benchmark results are not really impressive. I still like PR 11954 
because it removes code (simply loops). _PyTuple_FromArray() has a well defined 
API and is safe (I'm saying that because PR 11927 adds an "unsafe" function). 
As soon as it's private, I'm fine with it.

I'm more attracted by the code simplification than performance boost here.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36030>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to