alphadose / haxmap

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

UUID for Key? #27

Closed jaekook-neonesia closed 1 year ago

jaekook-neonesia commented 1 year ago

Hi, thank you for your excellent map. How can I use google/UUID for the key? or can you add this feature to the map?

alphadose commented 1 year ago

@jaekook-neonesia the underlying type of UUID is [16]byte which doesn't have the comparable trait in golang (==, != etc)

Hence, it is not possible to implement UUID in this map implementation.

To add UUID support, a copy of this map has to be made specifically for using UUID as a key, it will no longer be generic in nature