STINNER Victor added the comment: > avoid memset in small tuple creation
I don't understand this title because there is no call to memset() in the patch. Can you try to modify PyTuple_New() to use memset() instead of a dummy loop? Adding a _PyTuple_New() which doesn't initialize the memory doesn't seem safe to me. You may try to allocate the tuple with PyObject_Calloc(), but when I tried on other types, it was slower than PyObject_Malloc() for sizes smaller than 1 MB. ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21148> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com