deque
Generic deque container (by earthboundkid)
gocommons
Common Go lang data structures, utilities, ML algorithms etc (by hishboy)
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
deque
Posts with mentions or reviews of deque.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-15.
-
lists with generics in go stdlib
There’s no active proposal to add linked lists to the standard library, no. Linked lists have poor performance for most use cases, so I don’t think it’s on anyone’s radar to rush it in. That said, it will probably happen someday. Here’s a generic deque implementation you can use until then: https://github.com/carlmjohnson/deque
- Dynamic array which does not reallocate its elements?
- Are there implementations of data structures with generics? Are they needed?
-
Memory efficient FIFO structure. Could it be that simple?
If you can use Go tip, there’s https://github.com/carlmjohnson/deque
- A generic deque container
gocommons
Posts with mentions or reviews of gocommons.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-11-21.
-
Memory efficient FIFO structure. Could it be that simple?
I needed a memory efficient, performant and go-routine-safe queue ie FIFO data structure. To try not to reinvent the wheel I went on google in search of one. After a minute or two I found a slice based one and it served me well until I ran into one issue. When the queue was filled with millions of items and then emptied, I noticed that the memory allocation didn't decrease. So I tried to force GC but that didn't work. After more research and testing I could not reduce existing slice memory allocation without allocating new slice and copy any data remaining in the old one. That was not acceptable for a heavy trafficked queue. It cannot pause all reads and writes to wait for memory shuffling. So I went back on google and found this peace of code. Then I was like "Oh yea I know this from my CS class - a simple Singly Linked List. Haven't had a need to implement one since then."
What are some alternatives?
When comparing deque and gocommons you can also consider the following projects:
gods - GoDS (Go Data Structures) - Sets, Lists, Stacks, Maps, Trees, Queues, and much more