[pypy-issue] [issue1206] Extreme slowdown of code part (array.array) operations
mikefc
tracker at bugs.pypy.org
Wed Jul 18 11:36:51 CEST 2012
mikefc <coolbutuseless at gmail.com> added the comment:
If you change "del self.__arr[:self.expected]" to "self.__arr = self.__arr[self.expected:]"
then the code is only a factor 20x slower (instead of 1715x)
After making the above change I got these times:
time ~/pypy-latest/bin/pypy pypy_bug.py
process size 2511188 kb
real 0m17.942s
user 0m14.875s
sys 0m3.064s
time python pypy_bug.py
process size 2441100 kb
real 0m1.019s
user 0m0.998s
sys 0m0.018s
----------
nosy: +mikefc
status: unread -> chatting
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1206>
________________________________________
More information about the pypy-issue
mailing list