Awesome Go

Data Structures and Algorithms

88 libraries in this category

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
conjungo

A small, powerful and flexible merge library.

127Data Structures and AlgorithmsFrameworks for performing ELT / ETL
treap

Persistent, fast ordered map using tree heaps.

27Data Structures and AlgorithmsFrameworks for performing ELT / ETL
slices

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

17Data Structures and AlgorithmsFrameworks for performing ELT / ETL
bingo

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

Data Structures and AlgorithmsBit-packing and Compression
binpacker

Binary packer and unpacker helps user build custom binary stream

Data Structures and AlgorithmsBit-packing and Compression
bit

Golang set data structure with bonus bit-twiddling functions

Data Structures and AlgorithmsBit-packing and Compression
crunch

Go package implementing buffers for handling various datatypes easily

Data Structures and AlgorithmsBit-packing and Compression
go-ef

A Go implementation of the Elias-Fano encoding

Data Structures and AlgorithmsBit-packing and Compression
roaring

Go package implementing compressed bitsets

Data Structures and AlgorithmsBit-packing and Compression
bitmap

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

Data Structures and AlgorithmsBit Sets
bitset

Go package implementing bitsets

Data Structures and AlgorithmsBit Sets
bloom

Go package implementing Bloom filters

Data Structures and AlgorithmsBloom and Cuckoo Filters
bloom

Bloom filters implemented in Go

Data Structures and AlgorithmsBloom and Cuckoo Filters
bloom

Golang Bloom filter implementation

Data Structures and AlgorithmsBloom and Cuckoo Filters
bloomfilter

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

Data Structures and AlgorithmsBloom and Cuckoo Filters
boomfilters

Probabilistic data structures for processing continuous, unbounded streams

Data Structures and AlgorithmsBloom and Cuckoo Filters
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

Data Structures and AlgorithmsBloom and Cuckoo Filters
cuckoofilter

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

Data Structures and AlgorithmsBloom and Cuckoo Filters
ring

Go implementation of a high performance, thread safe bloom filter

Data Structures and AlgorithmsBloom and Cuckoo Filters
algorithms

Algorithms and data structures.CLRS study

Data Structures and AlgorithmsData Structure and Algorithm Collections
go-datastructures

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

Data Structures and AlgorithmsData Structure and Algorithm Collections
gods

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

Data Structures and AlgorithmsData Structure and Algorithm Collections
gostl

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

Data Structures and AlgorithmsData Structure and Algorithm Collections
goterator

Iterator implementation to provide map and reduce functionalities

Data Structures and AlgorithmsIterators
iter

Go implementation of C++ STL iterators and algorithms

Data Structures and AlgorithmsIterators
cmap

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

Data Structures and AlgorithmsMaps
dict

Python-like dictionaries (dict) for Go

Data Structures and AlgorithmsMaps
go-shelve

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

Data Structures and AlgorithmsMaps
goradd/maps

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

Data Structures and AlgorithmsMaps
concurrent-writer

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

Data 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)

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
fsm

Finite-State Machine package

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
genfuncs

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

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
go-generics

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

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
go-geoindex

In-memory geo index

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
go-rampart

Determine how intervals relate to each other

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
go-rquad

Region quadtrees with efficient point location and neighbour finding

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
go-tuple

Generic tuple implementation for Go 1.18+

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
go18ds

Go Data Structures using Go 1.18 generics

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
gofal

fractional api for Go

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
gogu

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

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
gota

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

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
hide

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

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
hyperloglog

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

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
quadtree

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

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
slices

Pure, generic functions for slices

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
nan

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

Data Structures and AlgorithmsNullable Types
null

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

Data Structures and AlgorithmsNullable Types
typ

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

Data Structures and AlgorithmsNullable Types
deque

A highly optimized double-ended queue

Data Structures and AlgorithmsQueues
deque

Fast ring-buffer deque (double-ended queue)

Data Structures and AlgorithmsQueues
goconcurrentqueue

Concurrent FIFO queue

Data Structures and AlgorithmsQueues
memlog

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

Data Structures and AlgorithmsQueues
queue

Multiple thread-safe, generic queue implementations for Go

Data Structures and AlgorithmsQueues
dsu

Disjoint Set data structure implementation in Go

Data Structures and AlgorithmsSets
golang-set

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

Data Structures and AlgorithmsSets
goset

A useful Set collection implementation for Go

Data Structures and AlgorithmsSets
set

Simple set data structure implementation in Go using LinkedHashMap

Data Structures and AlgorithmsSets
bleve

Modern text indexing library for go

Data Structures and AlgorithmsText Analysis
go-adaptive-radix-tree

Go implementation of Adaptive Radix Tree

Data Structures and AlgorithmsText Analysis
go-edlib

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

Data Structures and AlgorithmsText Analysis
levenshtein

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

Data Structures and AlgorithmsText Analysis
levenshtein

Implementation to calculate levenshtein distance in Go

Data Structures and AlgorithmsText Analysis
mspm

Multi-String Pattern Matching Algorithm for information retrieval

Data Structures and AlgorithmsText Analysis
parsefields

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

Data Structures and AlgorithmsText Analysis
ptrie

An implementation of prefix tree

Data Structures and AlgorithmsText Analysis
trie

Trie implementation in Go

Data Structures and AlgorithmsText Analysis
hashsplit

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

Data Structures and AlgorithmsTrees
merkle

Space-efficient computation of Merkle root hashes and inclusion proofs

Data Structures and AlgorithmsTrees
skiplist

Very fast Go Skiplist implementation

Data Structures and AlgorithmsTrees
skiplist

Skiplist implementation in Go

Data Structures and AlgorithmsTrees
treemap

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

Data Structures and AlgorithmsTrees
ordered-concurrently

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

Data Structures and AlgorithmsPipes
parapipe

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

Data Structures and AlgorithmsPipes
pipeline

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

Data Structures and AlgorithmsPipes
ribbonGo

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

Data Structures and AlgorithmsBloom and Cuckoo Filters
gloop

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

Data Structures and AlgorithmsIterators
concurrent-swiss-map

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

Data Structures and AlgorithmsMaps
hmap

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

Data Structures and AlgorithmsMaps
combo

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

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
FSM

FSM for Go

Data Structures and AlgorithmsMiscellaneous Data Structures and Algorithms
deheap

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

Data Structures and AlgorithmsQueues
dqueue

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

Data Structures and AlgorithmsQueues
hatchet

Distributed, Fault-tolerant task queue

Data Structures and AlgorithmsQueues
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

Data Structures and AlgorithmsQueues
graphlib

Topological sort lib,Sorting and pruning of DAG graphs

Data Structures and AlgorithmsTrees
pipelines

Generic pipeline functions for concurrent processing

Data Structures and AlgorithmsPipes