[issue3873] Unpickling is really slow

STINNER Victor report at bugs.python.org
Mon Apr 6 13:56:50 CEST 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

My version of pickletest.py:
 - make sure that file position is correct after the load()
 - some benchmark. most interesting numbers:

without the patch :

version | data       | dump ms | load ms |
 py3k   | 0,    10^6 |     230 |    1500 |
 py3k   | 1000, 10^6 |     255 |    1780 |
 py3k   | 0,    10^7 |    2360 |   16044 |
 py3k   | 1000, 10^7 |    2615 |   19380 |

with the patch:

version | data       | dump ms | load ms | speed up:
 py3k   | 0,    10^6 |     237 |     183 | x8
 py3k   | 1000, 10^6 |     241 |     248 | x7
 py3k   | 0,    10^7 |    2420 |    1860 | x8
 py3k   | 1000, 10^7 |    2850 |    3100 | x6

(data: 0, 10^6 means: [0]*10^6)

----------
Added file: http://bugs.python.org/file13633/pickletest.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3873>
_______________________________________


More information about the Python-bugs-list mailing list