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 

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 <>
Python-bugs-list mailing list

Reply via email to