New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
random.shuffle slow on deque #48373
Comments
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 |
Why do you think this is a bug? |
If it's not a bug, it is at least a surprising gotcha that should be |
Well, perhaps the deque documentation should make it clear that random |
Will add a note to the deque docs that random access is O(n). |
Patch attached. |
Done in r66913. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: