Re:Ristretto: A High Performance, Concurrent, Memory-Bound G...
by grumpydba on Saturday September 21, 2019 @02:26PM
(#21037014)
Could this be solved by some sort of cuckoo hashing?
[ Parent
| on HN ]
Re:Ristretto: A High Performance, Concurrent, Memory-Bound G...
by mrjn on Saturday September 21, 2019 @03:01PM
(#21037210)
The benefit of current hashing algorithm is that Go team is maintaining it ;-). Its written in assembly and runs in single digit nanoseconds.
One way to check for collision would be to either store the key as well or use another hashing algorithm (which would further decrease the probability of collision, but not eliminate it). Either would introduce some slowness, because every Get would need to be checked.
Re:Ristretto: A High Performance, Concurrent, Memory-Bound G...
by sethammons on Saturday September 21, 2019 @04:25PM
(#21037720)
Storing the key with the value is a solid workaround.