Alexander Belopolsky added the comment: PEP 393 implementation has already added the fast path to decimal encoding:
http://hg.python.org/cpython/diff/8beaa9a37387/Objects/unicodeobject.c#l1.3735 What we can do, however, is improve performance of converting non-ascii numerals by looking up only the first digit's value and converting the rest using simple: value = code - (first_code - first_value) if not 0 <= value < 10: raise or fall back to UCD lookup ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10581> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com