Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
CPython is written on C, not C++, so we cannot use std::from_chars. Note also that to parse a number in JSON we need first to scan the PyUnicode object character-by-character using PyUnicode_READ() which is slower than just reading a byte from a memory, then convert a substring to a nul-terminated bytes string, and finally use the conversion function which creates a new PyFloat or PyLong objects. The overhead of scanning a string and memory management may be larger than the parsing time itself. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41310> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com