[Feature Request] Support for Python collections.deque
See original GitHub issueFeature request
The official Python 3.9.7 documentation shows a few containers and their descriptions
Being specific, deque is still a popular FIFO implementation option for its robustness and performance, as in this StackOverflow thread.
I searched Numba forums and issues for deque support, but I didn’t find any clue about it. Are there intentions to support it? Are there technical difficulties in implementing it?
The only mention of an attempt at creating a FIFO with Numba JIT is from this other SO question, but it’s definitely not robust and performant as collections.deque.
I first found about this problem when trying to learn how to use @jitclass with a very simple delayed_adder class which uses a deque as a FIFO to output addition results delayed by a few cycles (function calls).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:5 (3 by maintainers)

Top Related StackOverflow Question
Yes, we do have set and dict and list support, I think even for
collections.heapq. Support is growing. If you need single ended queue, you can use list. I mean, you can use list to implement a deque easily, but removing items from the front will be computationally expensive, whereas removing items from the end will have an amortized constant runtime cost.@danilo-bc thank you for raising this, I have labelled it as a feature request accordingly.