[pypy-issue] [issue954] looped string formatting of dict entry slow and hogging memory

mikefc tracker at bugs.pypy.org
Mon Dec 5 15:20:36 CET 2011


New submission from mikefc <coolbutuseless at gmail.com>:

Something weird is going on in the attached code.

For some reason my "mode 3" way of appending a dict value to an array blows the memory 
use way up (with a corresponding increase in runtime).  Times are still sane on 
python2.7.2.

Reducing the dummy data array from 10000 down to 5000 makes the problem disappear.

=======================
Python2.7.2
python ./test.py 
Creating dummy data took: 0:00:00.613495
re-blurging mode 1 took:  0:00:08.421940
re-blurging mode 2 took:  0:00:11.934971
re-blurging mode 3 took:  0:00:21.842969

=======================
pypy1.7
~/pypy-1.7/bin/pypy ./test.py 
Creating dummy data took: 0:00:00.784412
re-blurging mode 1 took:  0:00:07.582524
re-blurging mode 2 took:  0:00:09.109858
re-blurging mode 3 took:  0:01:15.368807

----------
files: test.py
messages: 3539
nosy: mikefc, pypy-issue
priority: performance bug
release: 1.7
status: unread
title: looped string formatting of dict entry slow and hogging memory

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue954>
________________________________________


More information about the pypy-issue mailing list