Message74773
This is observed in Python 2.5.1, I haven't tried any later versions.
d = collections.deque(xrange(100000))
random.shuffle(d)
is quite slow. Increasing the size to 200k, 300k, etc. shows that the
runtime increases quadratically or worse. It's much faster to convert
the deque to a list, shuffle the list, and make a new deque from the
shuffled list. |
|
Date |
User |
Action |
Args |
2008-10-14 22:03:01 | phr | set | recipients:
+ phr |
2008-10-14 22:03:01 | phr | set | messageid: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za> |
2008-10-14 22:03:00 | phr | link | issue4123 messages |
2008-10-14 22:02:59 | phr | create | |
|