A Golang lock-free thread-safe HashMap optimized for fastest read access. It is not a general-use HashMap and currently has slow write performance for write-heavy use. The minimal supported Golang version is 1.19 as it makes use of Generics and the new atomic package helpers. Reading from the hash map for numeric key types in a thread-safe way is faster than reading from a standard Golang map in an unsafe way and four times faster than Golang's sync.Map. Technical design decisions have been made based on benchmarks that are stored in an external repository: go-benchmark. The library uses a sorted linked list and a slice as an index into that list. The Get() function contains helper functions that have been inlined manually until the Golang compiler will inline them automatically. It optimizes the slice access by circumventing the Golang size check when reading from the slice.

Features

  • A Golang lock-free thread-safe HashMap optimized for fastest read access
  • It is not a general-use HashMap and currently has slow write performance for write heavy uses
  • The minimal supported Golang version is 1.19 as it makes use of Generics and the new atomic package helpers
  • Use the map to count URL requests
  • The library uses a sorted linked list and a slice as an index into that list
  • For hashing, specialized xxhash implementations are used that match the size of the key type where available

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

Apache License V2.0

Follow hashmap

hashmap Web Site

Other Useful Business Software
Paessler: Easy to Use With Enterprise Power. Free Trial Icon
Paessler: Easy to Use With Enterprise Power. Free Trial

A low-code dashboard makes monitoring intuitive for any admin, while scripting and custom sensors give experts full control.

You shouldn't have to choose between a monitoring tool that's easy to use and one that's powerful enough for a complex environment. PRTG's low-code interface lets any admin build dashboards, set alerts and monitor devices without scripting, while custom sensors and full API access are there when your team needs deeper control. One platform, no compromise. Download a free 30-day trial now.
Get Free Download
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of hashmap!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Frameworks

Registered

2023-02-01