[issue37587] JSON loads performance improvement for long strings
Marco Paolini
report at bugs.python.org
Thu Aug 15 16:46:05 EDT 2019
Marco Paolini <markopaolini at gmail.com> added the comment:
ops sorry here's the right commands
python -m pyperf timeit -s 'import json;' -s 'c = "a"; s = json.dumps(c * (2**10 // (len(json.dumps(c)) - 2)))' 'json.loads(s)' -o ascii2k.json
python -m pyperf timeit -s 'import json;' -s 'c = "€"; s = json.dumps(c * (2**10 // (len(json.dumps(c)) - 2)))' 'json.loads(s)' -o nonascii2k.json
Mean +- std dev: [ascii2k] 3.69 us +- 0.05 us -> [nonascii2k] 12.4 us +- 0.1 us: 3.35x slower (+235%)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37587>
_______________________________________
More information about the Python-bugs-list
mailing list