A high-performance, thread-safe Bloom filter implementation in Go.
Ring is a Go package that provides a high-performance, thread-safe implementation of a Bloom filter. It solves the problem of efficiently testing set membership with minimal memory usage, using probabilistic techniques to determine if an element is likely in a set or definitely not.
Go developers building applications that require efficient set membership checks, such as caching systems, network routers, or databases, where performance and low memory overhead are critical.
Developers choose Ring for its combination of speed, thread safety, and configurable accuracy, backed by rigorous testing and a simple API, making it a reliable choice for production Go applications.
Package ring provides a high performance and thread safe Go implementation of a bloom filter.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks in the README show Add() and Test() operations at 158 ns/op and 173 ns/op, making it exceptionally quick for high-throughput applications.
Designed to be thread-safe for concurrent use across goroutines without external synchronization, as highlighted in the key features.
Allows setting a target false positive rate (e.g., 0.1%) and validates it through rigorous testing, ensuring reliable probabilistic performance.
Includes marshaling and unmarshaling capabilities, enabling simple serialization for saving filter states or transmitting data.
Supports merging multiple Bloom filters, which is useful for distributed data aggregation, as demonstrated in the test suite.
Inherent to Bloom filters, it can produce false positives, making it unsuitable for applications where exact membership is non-negotiable.
Exclusive to Go, limiting integration in mixed-technology stacks without additional bridging or reimplementation efforts.
Achieving very low false positive rates requires increased memory allocation, which might not be feasible in resource-constrained environments.
Lacks support for deleting individual elements; while it offers reset functionality, this doesn't accommodate dynamic datasets with eviction needs.