workiva/go-datastructures

A collection of useful, performant, and threadsafe Go datastructures.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 33 minutes ago
Added to GitGenius on September 8th, 2026
Created on October 29th, 2014
Open Issues & Pull Requests: 30 (+0)
GitHub issues: Enabled
Number of forks: 842
Total Stargazers: 7,955 (+0)
Total Subscribers: 313 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.8 days
Mean response time: 329.7 days
90th percentile: 656.6 days
Tracked items: 2

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

No overlapping-contributor repos identified yet.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 3
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 658 days
Stale 30+ days: 2
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

Detailed Description

go-datastructures is a collection of performant and threadsafe data structures for Go.

The project addresses the need for specialized data structures optimized for specific use cases where standard Go collections fall short. It provides implementations tuned for performance characteristics that matter in practice: interval trees for multidimensional range queries, bit arrays for membership testing without hashing overhead, futures for broadcasting events to multiple listeners, and queues that never block on send and grow dynamically. The augmented tree uses red-black balancing to maintain O(log n) operations for insertions, deletions, and queries in single dimensions. Bit arrays offer two variants—regular and sparse—trading insertion speed for space efficiency, and include operations for detecting intersection between arrays. The queue implementations avoid the blocking semantics and panic behavior of Go channels, instead returning errors only when pushing to a disposed queue.

Developers should consider this collection when building systems that require specific algorithmic properties. The augmented tree suits applications needing collision detection across dimensional ranges. The Fibonacci heap implementation is valuable for graph algorithms like Dijkstra or Prim's where decrease-key operations are frequent, though the large constant factors mean it may underperform simpler heap variants in practice. The MPMC ring buffer addresses goroutine synchronization and graceful shutdown patterns using only compare-and-swap operations. The futures package solves a genuine limitation of Go channels—the inability to broadcast a single message to multiple listeners. Projects with performance-critical paths or those requiring threadsafe concurrent access without locks will benefit most from these structures.

The project maintains a focused scope on core data structures with clear algorithmic properties documented in the README. Development activity shows ongoing refinement, with the priority queue explicitly noted as targeted for improvement via Fibonacci heap integration and the project including benchmarks to validate performance claims. The codebase demonstrates attention to threadsafety through careful use of synchronization primitives like CAS operations rather than mutex-based locking.