[pypy-dev] set with instances very slow from 1.8 to 1.9
wilk
wilk at flibuste.net
Tue Jun 19 15:51:11 CEST 2012
Hi,
I could isolate a piece of my code that show a big regression from 1.8
to 1.9, event from cpython to 1.9 with operations on set of instances.
On the other side set of integer are faster !
Should i open an issue on the bug tracker ?
$ python t.py
with instances = 0.02350
with integers = 0.02825
$ pypy-1.8 t.py
with instances = 0.00935
with integers = 0.02891
$ pypy-1.9 t.py
with instances = 0.41753
with integers = 0.00628
pypy-last/bin/pypy t.py
with instances = 0.34686
with integers = 0.00628
import random
import time
import sys
class X:
pass
def bcl(a,b):
for i in range(1000):
a |= b
x1 = set([X() for i in range(1000)])
x2 = set([X() for i in range(1000)])
start = time.time()
bcl(x1, x2)
print "with instances = %.05f" % (time.time()-start)
x1 = set(range(1000))
x2 = set(range(1000))
start = time.time()
bcl(x1, x2)
print "with integers = %.05f" % (time.time()-start)
--
William Dodé
Informaticien Indépendant
More information about the pypy-dev
mailing list