[pypy-issue] [issue994] significantly slow joins
Twirrim
tracker at bugs.pypy.org
Tue Jan 10 10:08:37 CET 2012
New submission from Twirrim <paulgraydon at hotmail.com>:
I'm uncertain whether it's appropriate to raise this as a new bug. It seems
tied to 866 (maybe?), but against 1.7 release and nightly (2012-01-10) this
particular case is significantly slower than python 2.7.2.
This started from what may be an ugly approach to problem 40 on Project Euler,
but after finding the speed problem I wanted to double check the cause so added
an extra benchmark:
slowjoin.py:
from time import time
start = time()
ir="0"
i=1
while (len(ir)<1000001):
ir = ir+''.join(str(i))
i=i+1
print time()-start
start = time()
ir="0"
i=1
# about the same number of loops
for i in range(1,185187):
ir = str(i)
i=i+1
print time()-start
CPython 2.7.2:
0.251733064651
0.0624940395355
PyPy 1.7:
23.9713470936
0.0105218887329
PyPy Nightly (2012-01-10):
24.7200191021
0.010559797287
----------
messages: 3685
nosy: Twirrim, pypy-issue
priority: performance bug
release: 1.7
status: unread
superseder: [PATCH] join is slow about 2x slower than Python
title: significantly slow joins
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue994>
________________________________________
More information about the pypy-issue
mailing list