You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moves the int(x) == x test and conversion into the C code for operator.index().
Provides a 7% speed up:
$ pytime -s 'from random import randrange' 'randrange(15)' # baseline
500000 loops, best of 11: 540 nsec per loop
$ pytime -s 'from random import randrange' 'randrange(15)' # new versio
500000 loops, best of 11: 502 nsec per loop
It should become even faster when we get a zero-cost try.
It's odd that non-integers raise a ValueError. I think that should have been TypeError.
Moves the
int(x) == xtest and conversion into the C code for operator.index().Provides a 7% speed up:
It should become even faster when we get a zero-cost try.
It's odd that non-integers raise a ValueError. I think that should have been TypeError.
https://bugs.python.org/issue42222