4

I've seen the Fowler-Noll-Vo (FNV) recommended as a good choice for a fast hashing algorithm for use in our implementation of a consistent hashing system.

Can't seem to locate a good Java source for it though.

Steve Kuo
  • 61,876
  • 75
  • 195
  • 257
justinhj
  • 11,147
  • 11
  • 58
  • 104
  • Where can we see more about the FLV-1 hash alg? – jsight Aug 19 '09 at 21:10
  • I can't find any hash algorithms named FLV with google. Are you sure you don't mean FNV? – Rob Aug 19 '09 at 21:11
  • http://www.last.fm/user/RJ/journal/2007/04/10/rz_libketama_-_a_consistent_hashing_algo_for_memcache_clients My bad. The source was a comment in this web page. Seems to have been a typo. – justinhj Aug 19 '09 at 22:05

1 Answers1

5

You can find Java sources at getopt.org.

Anirudh Ramanathan
  • 46,179
  • 22
  • 132
  • 191
Rob
  • 2,148
  • 13
  • 17
  • 1
    I would add that you should consider this comment: "This is a very fast hash, with excellent avalanche behavior. Compared with the FNV1a32 (see below) it's roughly 10 times faster, and roughly 5 times faster that a Java version of Jenkins' hash ( available here). This implementation is a Java port of a C version of MurmurHash 2.0 ." – ShuggyCoUk Aug 19 '09 at 22:19
  • @ShuggyCoUk That comment was for MurmurHash not for FNV – Suraj Chandran Jan 05 '20 at 13:56