alphadose / haxmap

Fastest and most memory efficient golang concurrent hashmap
MIT License
915 stars 45 forks source link

When to use this package #9

Closed vtolstov closed 2 years ago

vtolstov commented 2 years ago

In which cases using this package really needed vs standard go map with mutex? For example if I have 10 entries?

alphadose commented 2 years ago

for small datasets there wouldn't be any noticeable difference between haxmap and the default go map.

the difference would start to show with an increase in dataset size and more number of goroutines reading/writing concurrently in which case mutex locking/unlocking would be much slower as compared to haxmap which uses lock-free linked list internally

vtolstov commented 2 years ago

Thank you