Mark Dickinson added the comment: > Am I missing anything that might cause my patches to introduce a performance > penalty?
It's at least conceivable that code like Py_SIZE(v) = negative ? -ndigits : ndigits; might be compiled to something branchless on some platforms (with some sets of compiler flags). The assembly you show demonstrates that that doesn't happen on your machine, but that doesn't say anything about other current or future machines. I also prefer the original form for readability; so I agree with Serhiy that we shouldn't change it without evidence that the change improves performance. I'll remove the two obviously redundant `Py_SIZE(v) = ...` operations in PyLong_FromUnsignedLong and PyLong_FromUnsignedLongLong. ---------- assignee: -> mark.dickinson _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27441> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com