This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author phr
Recipients phr
Date 2008-10-14.22:02:59
SpamBayes Score 1.0129382e-05
Marked as misclassified No
Message-id <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-10-14 22:03:01phrsetrecipients: + phr
2008-10-14 22:03:01phrsetmessageid: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za>
2008-10-14 22:03:00phrlinkissue4123 messages
2008-10-14 22:02:59phrcreate