[issue37837] add internal _PyLong_FromUnsignedChar() function

Greg Price report at bugs.python.org
Sat Aug 24 19:22:38 EDT 2019


Greg Price <gnprice at gmail.com> added the comment:

> Is there a particular reason to specifically call PyLong_FromSize_t? Seems like PyLong_FromLong is the natural default (and what we default to in the rest of the code), and it's what this ends up calling anyway.

Ah I see, the patch is meant to go on top of GH-15192, which makes PyLong_FromSize_t apply the small-int optimization itself.

As I just suggested on GH-15192, I'd like to see that PR apply the small-int optimization in the more broadly-used PyLong_FromUnsignedLong... and then I think the natural thing for this new function to do is to call that.

Still quite curious how LTO does, and also curious what compiler and flags you're using in benchmarks.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37837>
_______________________________________


More information about the Python-bugs-list mailing list