Xavier de Gaye added the comment:

Good point.
PyLong_FromLong() is faster than PyLong_FromLongLong(), IMO the fastest should 
be used when it is possible.
PyLong_FromUnsignedLong() and PyLong_FromUnsignedLongLong() are almost 
identical, they implement the same algorithm. The first one uses unsigned long 
(on the stack and for a register) while the other uses unsigned long long, so 
the difference in performance may be in the order of nano seconds on current 
processors. Should only PyLong_FromUnsignedLongLong() be used then or should 
this be left as is for consistency with the handling of PyLong_FromLong() ?

Another point (not related) is that the d_ino member of the DirEntry structure 
is of type ino_t which is unsigned and PR 1666 should be corrected to use 
unsigned instead in the last modifications made by the PR in 
os_DirEntry_inode_impl(). I will push this change when a decision has been 
taken on the point raised by Martin.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29619>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to