Popularity
4.8
Growing
Activity
3.4
-
173
5
8
Programming language: Go
License: BSD 3-clause "New" or "Revised" License
Tags:
Data Structures
deque alternatives and similar packages
Based on the "Data Structures" category.
Alternatively, view deque alternatives based on common mentions on social networks and blogs.
-
gods
GoDS (Go Data Structures) - Sets, Lists, Stacks, Maps, Trees, Queues, and much more -
go-datastructures
A collection of useful, performant, and threadsafe Go datastructures. -
golang-set
A simple, battle-tested and generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp. -
willf/bloom
Go package implementing Bloom filters, used by Milvus and Beego. -
gocache
☔️ A complete Go cache library that brings you multiple ways of managing your caches -
boomfilters
Probabilistic data structures for processing continuous, unbounded streams. -
gostl
Data structure and algorithm library for go, designed to provide functions similar to C++ STL -
hyperloglog
HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) brought to you by Axiom -
trie
Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching. -
ttlcache
An in-memory cache with item expiration and generics [Moved to: https://github.com/jellydator/ttlcache] -
go-geoindex
Go native library for fast point tracking and K-Nearest queries -
go-adaptive-radix-tree
Adaptive Radix Trees implemented in Go -
Bloomfilter
Face-meltingly fast, thread-safe, marshalable, unionable, probability- and optimal-size-calculating Bloom filter in go -
goconcurrentqueue
Go concurrent-safe, goroutine-safe, thread-safe queue -
hilbert
Go package for mapping values to and from space-filling curves, such as Hilbert and Peano curves. -
cuckoo-filter
Cuckoo Filter go implement, better than Bloom Filter, configurable and space optimized 布谷鸟过滤器的Go实现,优于布隆过滤器,可以定制化过滤器参数,并进行了空间优化 -
ring
Package ring provides a high performance and thread safe Go implementation of a bloom filter. -
go-rquad
:pushpin: State of the art point location and neighbour finding algorithms for region quadtrees, in Go -
set
A simple Set data structure implementation in Go (Golang) using LinkedHashMap. -
nan
Zero allocation Nullable structures in one library with handy conversion functions, marshallers and unmarshallers -
goset
Set is a useful collection but there is no built-in implementation in Go lang.
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Promo
workos.com
Do you think we are missing an alternative of deque or a related project?
Popular Comparisons
README
Overview
Deque is a highly optimized double-ended queue.
Benchmark
Benchmark_PushBack/Deque<harden> 100000000 10.3 ns/op 9 B/op 0 allocs/op
Benchmark_PushBack/Deque 20000000 81.3 ns/op 24 B/op 1 allocs/op
Benchmark_PushBack/list.List 5000000 281 ns/op 56 B/op 2 allocs/op
Benchmark_PushFront/Deque<harden> 195840157 7.96 ns/op 9 B/op 0 allocs/op
Benchmark_PushFront/Deque 30000000 70.6 ns/op 24 B/op 1 allocs/op
Benchmark_PushFront/list.List 5000000 276 ns/op 56 B/op 2 allocs/op
Benchmark_Random/Deque<harden> 65623633 17.3 ns/op 0 B/op 0 allocs/op
Benchmark_Random/Deque 50000000 32.1 ns/op 4 B/op 0 allocs/op
Benchmark_Random/list.List 30000000 123 ns/op 28 B/op 1 allocs/op
Usage
import "github.com/edwingeng/deque"
dq := NewDeque()
dq.PushBack(100)
dq.PushBack(200)
dq.PushBack(300)
for !dq.Empty() {
fmt.Println(dq.PopFront())
}
dq.PushFront(100)
dq.PushFront(200)
dq.PushFront(300)
for i, n := 0, dq.Len(); i < n; i++ {
fmt.Println(dq.PopFront())
}
// Output:
// 100
// 200
// 300
// 300
// 200
// 100
Harden the element data type
./harden.sh <outputDir> <packageName> [elemType]