[issue20774] collections.deque should ship with a stdlib json serializer

Lisa Roach report at bugs.python.org
Wed Mar 6 00:21:12 EST 2019


Lisa Roach <lisaroach14 at gmail.com> added the comment:

Serhiy might be right, it looks significantly worse with benchmarking:

lisroach$ python3 -m timeit "import json; json.dumps(['test'])"
100000 loops, best of 3: 2.73 usec per loop

lisroach$ ./python.exe -m timeit "import json; json.dumps(['test'])"
10000 loops, best of 5: 21.2 usec per loop

lisroach$ python3 -m timeit "import json; json.dumps(10000)"
100000 loops, best of 3: 2.49 usec per loop

lisroach$ ./python.exe -m timeit "import json; json.dumps(10000)"
20000 loops, best of 5: 16.3 usec per loop

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20774>
_______________________________________


More information about the Python-bugs-list mailing list