어읽로꾸거
[python] Queue.Queue vs collections.deque 본문
Queue.Queue and collections.deque serve different purposes. Queue.Queue is intended for allowing different threads to communicate using queued messages/data, whereas collections.deque is simply intended as a datastructure. That's why Queue.Queue has methods like put_nowait(), get_nowait(), and join(), whereas collections.deque doesn't. Queue.Queue isn't intended to be used as a collection, which is why it lacks the likes of the in operator.
그래서 큐보다 데큐가 더 빠른듯
https://stackoverflow.com/questions/717148/queue-queue-vs-collections-deque
Queue.Queue vs. collections.deque
I need a queue which multiple threads can put stuff into, and multiple threads may read from. Python has at least two queue classes, Queue.Queue and collections.deque, with the former seemingly us...
stackoverflow.com
'정리' 카테고리의 다른 글
[Python] collections.deque 정리 (0) | 2019.09.28 |
---|---|
[Java] HashMap, HashTable, ConcurrentHashMap 비교 (0) | 2019.07.01 |
자료구조 - 힙(Heap) with C (0) | 2019.04.13 |
자료구조 - 트리(Tree) with C (0) | 2019.04.07 |
자료구조 - 연결 리스트(Linked List) with C (0) | 2019.04.06 |