Selection of non-cryptographic hash algorithm?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
For one samopisnogo load balancer, you should select the algorithm (non-cryptographic) checksum. Input (string keys) are always exactly 32 more bytes.

I'd love to hear the opinion of developers with a deep understanding of the topic. Which of the following algorithms would you recommend or caution against using it?

The fact that we managed to find himself:

  • fnv-1a is the most common description in the network;
  • lookup3 — what are inclined himself; in my opinion — the most optimal, but confused by the absence of references to successful application in projects, like fnv;
  • MurmurHash2 — judging by the available tests — the fastest, there is a history of use (libmemcached, Hadoop); but some inadequate collisions on certain test kits — — " pathological input sequence of 2^32 values causes the algorithm to suffer from a rate of hash collision as high as 97.6%"
by | 26 views

2 Answers

0 like 0 dislike
If not much bother, in the book of Kernighan and Pike's "Practice of programming" is a fairly simple algorithm:
enum { MULTIPLIER = 31 };
/* hash: compute
the hash function of the string */
unsigned int hash(char *str)
unsigned int h;
unsigned char *p;
h = 0;
for (p = (unsigned char *)
str; *p != '\\0'; p++)
h = MULTIPLIER * h +
*p; return h % table nhash; }
0 like 0 dislike
While numerous variations of CRC-why not suitable?

Related questions

0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
0 like 0 dislike
2 answers
asked Mar 25, 2019 by extratag
110,608 questions
257,186 answers
38,862 users