Thread (17 messages) 17 messages, 10 authors, 2009-02-18

Re: [PATCH] Update jhash.h with the new version of Jenkins' hash

flat view

From: Rusty Russell <hidden>
Date: 2009-02-12 21:40:26
Also in: lkml, netfilter-devel

On Wednesday 11 February 2009 20:49:20 Jozsef Kadlecsik wrote:
Hi,

The current jhash.h implements the lookup2() hash function by Bob Jenkins. 
However, lookup2() is outdated as Bob wrote a new hash function called 
lookup3(). The new hash function

- mixes better than lookup2(): it passes the check that every input bit 
  changes every output bit 50% of the time, while lookup2() failed it.
- performs better: compiled with -O2 on Core2 Duo, lookup3() is 20-40% 
  faster than lookup2() depending on the key length.
Hi Joszef,

My concern was that it's also bigger (and we inline it).  Performance is
pretty much a wash since we so rarely hash more than a few words.

Any stats on code size changes?
Rusty.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help