Closed puzpuzpuz closed 1 year ago
Wow, xsync is knocking on the door. The latest update of xsync has a significant performance boost.
@bagualing thanks. Yeah, MapOf
got more efficient in scenarios when the data set is small in the latest version.
@puzpuzpuz really great work, I will definitely check out xsync map implementation in more depth
I will also see if current haxmap performance can be improved from drawing inspiration from xsync map
I will definitely check out xsync map implementation in more depth
That would be awesome. You should be looking into MapOf
(generic map) as it's different from Map
(non-generic map). MapOf
overall design is quite simple: a hash table of cache-line-sized buckets holding key hashes + pointers to immutable key-value pairs. Each bucket is organized in a unrolled linked list and protected with a sync.Mutex
. The rehashing involves a bit tricky synchronization, but still not very complicated.
Adds xsync
MapOf
to the benchmarks to have one more map in the comparison.Results on my machine are the following: