A high-performance, thread-safe generic concurrent hash map implementation for Go using Swiss Map.
Concurrent Swiss Map is a Go library that provides a high-performance, thread-safe generic concurrent hash map implementation. It solves the problem of efficiently handling concurrent access to shared hash maps in multi-threaded Go applications by using a sharded architecture to minimize lock contention.
Go developers building concurrent applications that require shared, thread-safe hash maps, such as web servers, data processing pipelines, or real-time systems.
Developers choose Concurrent Swiss Map for its combination of memory efficiency, high performance under concurrent loads, and simple API, leveraging the proven Swiss Map implementation with Go generics for type safety.
A high-performance, thread-safe generic concurrent hash map implementation with Swiss Map.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses a sharded architecture to minimize lock contention, making it significantly faster in high-concurrent systems, as benchmarked against other implementations.
Benchmarks show better memory usage compared to other concurrent map implementations, optimizing resource consumption in memory-intensive applications.
Leverages Go 1.18+ generics to support any key and value types, ensuring compile-time type safety and reducing runtime errors.
Allows tuning of shard count, total capacity, and custom hash functions, providing adaptability to specific performance and hashing needs.
The README states 'New functions will be added soon,' indicating an incomplete or unstable API that may change and break existing code.
Relies on dolthub/swiss map under the hood, adding a layer of dependency that could introduce compatibility issues or limit control over the core implementation.
Requires explicit setup with shards and hashers, which can be complex for simple use cases compared to Go's built-in sync.Map that works out of the box.