Warm tip: This article is reproduced from serverfault.com, please click

Hash Table With Adaptive Hash Function

发布于 2020-10-04 19:10:29

The performance of a particular hash table depends heavily on both the keys and the hash function. Obviously one can improve the performance greatly by trying different hash functions based on the incoming elements, and picking the one resulting into the least collisions. Are there any publications on this subject, exploring the methods of selecting such functions dynamically with or without user guidance?

Questioner
Nash Gold
Viewed
0
kan 2020-12-02 05:04:50

I doubt there is a formal process to choose the best. There are too many moving parts. Especially when it comes to performance - there is no single "best performance" approach. Is it best latency? throughput? memory usage? cpu usage? More reads? More writes? Concurrent access? etc, etc, etc.

The only sensible way is to run performance tests for your specific code and use cases and choose what works for you.