All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] nf_conntrack: optimize hash calculation of tuple
Date: Fri, 26 May 2006 19:54:21 +0200	[thread overview]
Message-ID: <447740CD.7030407@trash.net> (raw)
In-Reply-To: <200605261504.k4QF4InW014648@toshiba.co.jp>

Yasuyuki KOZAKAI wrote:
>>But anyway, this is just a possible micro-optimization, the
>>real question is why we need three invocations of jhash_mix.
> 
> 
> That patch is just the result of extracting jhash() and jhash_2words().
> I'm not familiar with hash algorithms. Does the degree of distribution
> become bad if we replaces 3 jhash_mix with something like XOR ?


I'd say no. jhash was chosen because it has good distribution even
for non uniformly distributed input values, so it shouldn't be
necessary to try to provide more uniformly distributed input values
by hashing multiple times.

  parent reply	other threads:[~2006-05-26 17:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-26  0:15 [PATCH] nf_conntrack: optimize hash calculation of tuple Yasuyuki KOZAKAI
2006-05-26 13:34 ` Patrick McHardy
2006-05-26 13:45   ` YOSHIFUJI Hideaki / 吉藤英明
2006-05-26 13:51     ` Patrick McHardy
2006-05-26 14:17       ` YOSHIFUJI Hideaki / 吉藤英明
2006-05-26 15:04       ` Yasuyuki KOZAKAI
     [not found]       ` <200605261504.k4QF4InW014648@toshiba.co.jp>
2006-05-26 17:54         ` Patrick McHardy [this message]
2006-05-29  0:25           ` Yasuyuki KOZAKAI
     [not found]           ` <200605290025.k4T0PeSE014151@toshiba.co.jp>
2006-05-29  1:27             ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=447740CD.7030407@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=yasuyuki.kozakai@toshiba.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.