Popularity
2.7
Growing
Activity
0.0
Stable
39
4
2
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 generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp. -
gocache
☔️ A complete Go cache library that brings you multiple ways of managing your caches -
boomfilters
Probabilistic data structures for processing continuous, unbounded streams. -
hyperloglog
HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) -
gostl
Data structure and algorithm library for go, designed to provide functions similar to C++ STL -
trie
Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching. -
go-geoindex
Go native library for fast point tracking and K-Nearest queries -
ttlcache
An in-memory cache with item expiration and generics [Moved to: https://github.com/jellydator/ttlcache] -
Bloomfilter
Face-meltingly fast, thread-safe, marshalable, unionable, probability- and optimal-size-calculating Bloom filter in go -
hilbert
Go package for mapping values to and from space-filling curves, such as Hilbert and Peano curves. -
go-adaptive-radix-tree
Adaptive Radix Trees implemented in Go -
cuckoo-filter
Cuckoo Filter go implement, better than Bloom Filter, configurable and space optimized 布谷鸟过滤器的Go实现,优于布隆过滤器,可以定制化过滤器参数,并进行了空间优化 -
goconcurrentqueue
Go concurrent-safe, goroutine-safe, thread-safe queue -
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.
Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.
Promo
www.sonarlint.org
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]