[issue21955] ceval.c: implement fast path for integers with a single digit

STINNER Victor report at bugs.python.org
Fri Feb 5 21:12:02 EST 2016


STINNER Victor added the comment:

msg223186, Serhiy Storchaka about inline.patch: "Confirmed speed up about 20%. Surprisingly it affects even integers outside of the of preallocated small integers (-5...255)."

The optimization applies to Python int with 0 or 1 digit so in range [-2^30+1; 2^30-1].

Small integers in [-5; 255] might be faster but for PyLong_FromLong().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21955>
_______________________________________


More information about the Python-bugs-list mailing list