1 pointby puzpuzpuz-hn3 hours ago1 comment
  • puzpuzpuz-hn3 hours ago
    Benchmarks for 5 concurrent hash map implementations in Go: sync.Map, xsync.Map, cornelk/hashmap, alphadose/haxmap, and orcaman/concurrent-map.

    Workloads: read-heavy to write-heavy (100%/99%/90%/75% reads), with and without warm-up, plus range-under-contention (iteration while a writer mutates the map).

    Key types: string and int. Map sizes: 100 to 1M entries. GOMAXPROCS: 1, 4, 8, 12.

    Results are in the README with plots and a summary table.

    Disclaimer: I'm the author of xsync, one of the libraries benchmarked here. I did my best to keep the benchmark fair. If you spot issues or think another library should be included, please open an issue or PR.