[issue3873] Unpickling is really slow
Amaury Forgeot d'Arc
report at bugs.python.org
Mon Sep 15 19:24:27 CEST 2008
Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:
Indeed. If I replace the file with
f = io.BytesIO(open("tst", "rb").read())
timings are divided by 20...
After quick profiling, it seems that PyLong_New would benefit from a
free list. len(bytearray) is called very often.
To stay simple, it would be enough to only store longs of length 1 (<2**15).
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list