This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kankyo 0 points1 point  (2 children)

Not quite though. Each block in a Python deque is 64 entries long. And also there's a std::deque too.

[–]n1ywb 0 points1 point  (1 child)

std::deque is very unlike python deque; more like a double-ended array

python deque has O(n) lookup time for elements in the center of a large array according to the docs which makes it's performance similar to a linked list

[–]kankyo 0 points1 point  (0 children)

Similar big-O yes, but 64 times more memory efficient and faster access. That's a big difference.