Project

General

Profile

Actions

Task #4659

open

Look into using newer and better hash function

Added by Ashlesh Gawande over 6 years ago. Updated almost 2 years ago.

Status:
Code review
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Currently we use Murmurhash3, but newer and faster hashes are available:
CityHash (NFD uses it), FarmHash, xxHash (http://cyan4973.github.io/xxHash/)


Related issues 1 (1 open0 closed)

Related to PSync - Bug #4818: murmurHash3 of uint32_t is not endian safeCode reviewJunxiao Shi

Actions
Actions #1

Updated by Ashlesh Gawande almost 6 years ago

  • Related to Bug #4818: murmurHash3 of uint32_t is not endian safe added
Actions #2

Updated by Junxiao Shi over 5 years ago

My current favorite is SipHash.
This benchmark says xxHash is faster than SipHash on short inputs, although I don't know the collision situation.

Actions #3

Updated by Davide Pesavento about 5 years ago

Currently we use Murmurhash3, but newer and faster hashes are available

More importantly, I'm not sure if Murmur3 guarantees that the computed hash is the same on all architectures (e.g. big/little endian), so using it in a network protocol is a major issue. Other modern hash functions such as xxHash guarantee portability.

CityHash (NFD uses it), FarmHash, xxHash

If you're going to change hash function, I don't think there's a good reason to use CityHash or FarmHash today. xxHash is probably fine, and also take a look at SipHash and HighwayHash.

Actions #5

Updated by Davide Pesavento almost 3 years ago

  • Status changed from New to Code review
  • Assignee set to Junxiao Shi
  • Target version set to v0.4.0
  • Start date deleted (07/09/2018)
Actions #6

Updated by Ashlesh Gawande almost 3 years ago

So the current patch-set removes Murmurhash3. Is there any utility in keeping the code there for reproducing old results and for comparison purposes?

Actions #7

Updated by Junxiao Shi almost 3 years ago

If you need to reproduce old results, check out old version of code.
Fewer/single choice => fewer moving pieces, less code to maintain, less confusion to developers.

Actions #8

Updated by Davide Pesavento almost 2 years ago

  • Target version deleted (v0.4.0)
Actions

Also available in: Atom PDF