Awesome Go

Data Structures and Algorithms

93 libraries in this category

gods

Go Data Structures. Containers, Sets, Lists, Stacks, Maps, BidiMaps, Trees, HashSet etc

17,457Data Structures and AlgorithmsData Structure and Algorithm Collections
bleve

Modern text indexing library for go

11,236Data Structures and AlgorithmsText Analysis
hatchet

Distributed, Fault-tolerant task queue

8,120Data Structures and AlgorithmsQueues
go-datastructures

Collection of useful, performant, and thread-safe data structures

7,964Data Structures and AlgorithmsData Structure and Algorithm Collections
golang-set

Thread-Safe and Non-Thread-Safe high-performance sets for Go

4,767Data Structures and AlgorithmsSets
gota

Implementation of dataframes, series, and data wrangling methods for Go

3,259Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
roaring

Go package implementing compressed bitsets

2,949Data Structures and AlgorithmsBit-packing and Compression
bloom

Go package implementing Bloom filters

2,817Data Structures and AlgorithmsBloom and Cuckoo Filters
xsync

Concurrent scalable data structures like `xsync.Map`, a concurrent generic hash table

1,724Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
boomfilters

Probabilistic data structures for processing continuous, unbounded streams

1,647Data Structures and AlgorithmsBloom and Cuckoo Filters
bitset

Go package implementing bitsets

1,514Data Structures and AlgorithmsBit Sets
cuckoofilter

Cuckoo filter: a good alternative to a counting bloom filter implemented in Go

1,235Data Structures and AlgorithmsBloom and Cuckoo Filters
gostl

Data structure and algorithm library for go, designed to provide functions similar to C++ STL

1,142Data Structures and AlgorithmsData Structure and Algorithm Collections
hyperloglog

HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction

1,054Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
algorithms

Algorithms and data structures.CLRS study

842Data Structures and AlgorithmsData Structure and Algorithm Collections
trie

Trie implementation in Go

794Data Structures and AlgorithmsText Analysis
deque

Fast ring-buffer deque (double-ended queue)

787Data Structures and AlgorithmsQueues
go-edlib

Go string comparison and edit distance algorithms library (Levenshtein, LCS, Hamming, Damerau levenshtein, Jaro-Winkler, etc.) compatible with Unicode

608Data Structures and AlgorithmsText Analysis
levenshtein

Implementation to calculate levenshtein distance in Go

481Data Structures and AlgorithmsText Analysis
goconcurrentqueue

Concurrent FIFO queue

433Data Structures and AlgorithmsQueues
skiplist

Fast and easy-to-use skip list for Go

428Data Structures and AlgorithmsTrees
go-adaptive-radix-tree

Go implementation of Adaptive Radix Tree

412Data Structures and AlgorithmsText Analysis
bitmap

Dense, zero-allocation, SIMD-enabled bitmap/bitset in Go

385Data Structures and AlgorithmsBit Sets
queue

Multiple thread-safe, generic queue implementations for Go

368Data Structures and AlgorithmsQueues
go-geoindex

In-memory geo index

359Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
cuckoo-filter

Cuckoo filter: a comprehensive cuckoo filter, which is configurable and space optimized compared with other implements, and all features mentioned in original paper are available

306Data Structures and AlgorithmsBloom and Cuckoo Filters
skiplist

Very fast Go Skiplist implementation

296Data Structures and AlgorithmsTrees
hilbert

Go package for mapping values to and from space-filling curves, such as Hilbert and Peano curves.

278Data Structures and AlgorithmsFrameworks for performing ELT / ETL
concurrent-swiss-map

A high-performance, thread-safe generic concurrent hash map implementation with Swiss Map

258Data Structures and AlgorithmsMaps
binpacker

Binary packer and unpacker helps user build custom binary stream

234Data Structures and AlgorithmsBit-packing and Compression
deque

A highly optimized double-ended queue

204Data Structures and AlgorithmsQueues
iter

Go implementation of C++ STL iterators and algorithms

197Data Structures and AlgorithmsIterators
bit

Golang set data structure with bonus bit-twiddling functions

169Data Structures and AlgorithmsBit-packing and Compression
bloom

Bloom filters implemented in Go

147Data Structures and AlgorithmsBloom and Cuckoo Filters
ring

Go implementation of a high performance, thread safe bloom filter

146Data Structures and AlgorithmsBloom and Cuckoo Filters
memlog

An easy to use, lightweight, thread-safe and append-only in-memory data structure inspired by Apache Kafka

143Data Structures and AlgorithmsQueues
go-rquad

Region quadtrees with efficient point location and neighbour finding

141Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
conjungo

A small, powerful and flexible merge library.

127Data Structures and AlgorithmsFrameworks for performing ELT / ETL
gogu

A comprehensive, reusable and efficient concurrent-safe generics utility functions and data structures library

109Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
go-rampart

Determine how intervals relate to each other

106Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
cmap

a thread-safe concurrent map for go, support using `interface{}` as key and auto scale up shards

104Data Structures and AlgorithmsMaps
go-tuple

Generic tuple implementation for Go 1.18+

100Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
crunch

Go package implementing buffers for handling various datatypes easily

99Data Structures and AlgorithmsBit-packing and Compression
levenshtein

Levenshtein distance and similarity metrics with customizable edit costs and Winkler-like bonus for common prefix

93Data Structures and AlgorithmsText Analysis
bloom

Golang Bloom filter implementation

88Data Structures and AlgorithmsBloom and Cuckoo Filters
fsm

Finite-State Machine package

88Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
nan

Zero allocation Nullable structures in one library with handy conversion functions, marshallers and unmarshallers

88Data Structures and AlgorithmsNullable Types
go-generics

Generic slice, map, set, iterator, and goroutine utilities

84Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
skiplist

Skiplist implementation in Go

84Data Structures and AlgorithmsTrees
hide

ID type with marshalling to/from hash to prevent sending IDs to clients

72Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
count-min-log

Go implementation Count-Min-Log sketch: Approximately counting with approximate counters (Like Count-Min sketch but using less memory)

70Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
treemap

Generic key-sorted map using a red-black tree under the hood

68Data Structures and AlgorithmsTrees
concurrent-writer

Highly concurrent drop-in replacement for `bufio.Writer`

62Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
pipeline

An implementation of pipelines with fan-in and fan-out

60Data Structures and AlgorithmsPipes
goradd/maps

Go 1.18+ generic map interface for maps; safe maps; ordered maps; ordered, safe maps; etc

54Data Structures and AlgorithmsMaps
bingo

Fast, zero-allocation, lexicographical-order-preserving packing of native types to bytes

52Data Structures and AlgorithmsBit-packing and Compression
goset

A useful Set collection implementation for Go

52Data Structures and AlgorithmsSets
genfuncs

Go 1.18+ generics package inspired by Kotlin's Sequence and Map

50Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
dict

Python-like dictionaries (dict) for Go

48Data Structures and AlgorithmsMaps
go18ds

Go Data Structures using Go 1.18 generics

48Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
ordered-concurrently

Go module that processes work concurrently and returns output in a channel in the order of input

48Data Structures and AlgorithmsPipes
typ

Null Types, Safe primitive type conversion and fetching value from complex structures

46Data Structures and AlgorithmsNullable Types
ptrie

An implementation of prefix tree

46Data Structures and AlgorithmsText Analysis
go-ef

A Go implementation of the Elias-Fano encoding

42Data Structures and AlgorithmsBit-packing and Compression
quadtree

Generic, zero-alloc, 100%-test covered quadtree

41Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
radixtree

Adaptive radix tree (prefix-tree or compact-trie)

41Data Structures and AlgorithmsText Analysis
null

Nullable Go types that can be marshalled/unmarshalled to/from JSON

40Data Structures and AlgorithmsNullable Types
parapipe

FIFO Pipeline which parallels execution on each stage while maintaining the order of messages and results

38Data Structures and AlgorithmsPipes
hashsplit

Split byte streams into chunks, and arrange chunks into trees, with boundaries determined by content, not position

32Data Structures and AlgorithmsTrees
set

Simple set data structure implementation in Go using LinkedHashMap

30Data Structures and AlgorithmsSets
mspm

Multi-String Pattern Matching Algorithm for information retrieval

29Data Structures and AlgorithmsText Analysis
gloop

Convenient looping using Go's range-over-func feature

28Data Structures and AlgorithmsIterators
treap

Persistent, fast ordered map using tree heaps.

27Data Structures and AlgorithmsFrameworks for performing ELT / ETL
FSM

FSM for Go

27Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
merkle

Space-efficient computation of Merkle root hashes and inclusion proofs

24Data Structures and AlgorithmsTrees
slices

Pure, generic functions for slices

23Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
bloomfilter

Yet another Bloomfilter implementation in Go, compatible with Java's Guava library

21Data Structures and AlgorithmsBloom and Cuckoo Filters
goterator

Iterator implementation to provide map and reduce functionalities

20Data Structures and AlgorithmsIterators
gofal

fractional api for Go

20Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
pipelines

Generic pipeline functions for concurrent processing

19Data Structures and AlgorithmsPipes
dsu

Disjoint Set data structure implementation in Go

18Data Structures and AlgorithmsSets
deheap

Doubly-ended heap (min-max heap) with O(log n) access to both minimum and maximum elements

18Data Structures and AlgorithmsQueues
glinq

LINQ-like lazy evaluation library with type-safe generics, performance optimizations and zero dependencies

18Data Structures and AlgorithmsIterators
slices

Functions that operate on slices; like `package strings` but adapted to work with slices.

17Data Structures and AlgorithmsFrameworks for performing ELT / ETL
ribbonGo

First pure Go implementation of Ribbon filters (practically smaller than Bloom and Xor) for space-efficient approximate set membership queries

15Data Structures and AlgorithmsBloom and Cuckoo Filters
go-shelve

A persistent, map-like object for the Go programming language. Supports multiple embedded key-value stores

14Data Structures and AlgorithmsMaps
list

A generic, thread-safe doubly linked list with full iterator support and an intrusive singly linked list for embedded use; a feature-rich replacement for container/list

14Data Structures and AlgorithmsQueues
parsefields

Tools for parse JSON-like logs for collecting unique fields and events

9Data Structures and AlgorithmsText Analysis
dqueue

Simple, in memory, zero dependency and battle tested, thread-safe deferred queue

5Data Structures and AlgorithmsQueues
graphlib

Topological sort lib,Sorting and pruning of DAG graphs

5Data Structures and AlgorithmsTrees
genericsyncmap

Type-safe generic wrapper for `sync.Map` with full method parity and zero dependencies

5Data Structures and AlgorithmsMaps
combo

Combinatorial operations including permutations, combinations, and combinations-with-replacement

4Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
hmap

HMap is a concurrent and secure, generic support Map implementation designed to provide an easy-to-use API

2Data Structures and AlgorithmsMaps