[issue42304] [easy C] long type performance waste in 64-bit Windows build

Serhiy Storchaka report at bugs.python.org
Tue Nov 10 05:08:21 EST 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I do not think that this is suitable for newcomers because you need to have deep understanding why it was written in such form at first place and what will be changed if you change it.

The code was written when unsigned long long was not standard and 64-bit integer type was not required in Python. PyLong_FromUnsignedLongLong could just not exist on the particular platform. Using long long optionally would complicate the code, and it was not always justified. And it could negatively affect performance, especially on 32-bit platforms.

----------

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


More information about the Python-bugs-list mailing list