Open dmarro89 opened 6 months ago
@go-while I'm trying to deeply understand how data structures are implemented (and how they can be optimized), and the hashtable is the first on my list. I've just tried to "replicate" how the hastable works in Redis. This implementation could be a starting point to understand and improve. I'm also creating my own in-memory database and I want to use my own data structure in it. This means that the data structure must be optimized and efficient.
This isn't just about looping over a slice; it's a separate chaining algorithm used to handle collisions. Concurrency is the next step to handle - this implementation is a work in progress.
Have you seen just this loop? What about the other parts? The rehashing, the hash functions, the benchmarks? Maybe everything can be wrong, but I'm trying to make it right.
Since you seem to have strong opinions, I'd appreciate it if you could also provide comments on everything you think can be improved and how to do it.
Hi, I'd like to know your feedback about how to improve this data structure performances.