STINNER Victor <vstin...@redhat.com> added the comment:
> digits = ''.join([str(i) for i in range(10)]*10000000) > %timeit digits.isdigit() # --> 2X+ slower on python 3.7.1 This code calls: * (Python) str.isdigit() * unicode_isdigit_impl() * _PyUnicode_IsDigit() * _PyUnicode_ToDigit() which uses Python internal Unicode database This code doesn't depend on locales at all. It's pure Unicode. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35195> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com