Message329789
> 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. |
|
Date |
User |
Action |
Args |
2018-11-13 01:45:23 | vstinner | set | recipients:
+ vstinner, cgohlke, xtreak, Dragoljub |
2018-11-13 01:45:23 | vstinner | set | messageid: <1542073523.45.0.788709270274.issue35195@psf.upfronthosting.co.za> |
2018-11-13 01:45:23 | vstinner | link | issue35195 messages |
2018-11-13 01:45:23 | vstinner | create | |
|