netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <p.ozlabs@nwl.cc>
To: Florian Westphal <fw@strlen.de>
Cc: William Stafford Parsons <entrocraft@gmail.com>,
	pablo@netfilter.org, regit@netfilter.org,
	kadlec@blackhole.kfki.hu, netfilter-devel@vger.kernel.org
Subject: Re: Replacing DJB2 Hash
Date: Fri, 14 Mar 2025 18:56:28 +0100	[thread overview]
Message-ID: <Z9RtzLnczdxnY2aG@orbyte.nwl.cc> (raw)
In-Reply-To: <20250313201134.GA26508@breakpoint.cc>

On Thu, Mar 13, 2025 at 09:11:34PM +0100, Florian Westphal wrote:
> William Stafford Parsons <entrocraft@gmail.com> wrote:
> > Hi Core Netfilter Team,
> > 
> > I'm messaging you directly with a critical, simple patch suggestion.
> > 
> > I registered with the username *Eightomic*, but I'm having some issues
> > installing *pwclient* quickly without allowing *--break-system-packages*.
> > 
> > Lines 176-193 could be replaced in the following file.
> > 
> > https://git.netfilter.org/iptables/tree/iptables/nft-cache.c#n176
> > 
> > The following code replaces it.
> 
> .... but... why?

Quoting from https://eightomic.com/hash-32-a/

| EIGHTOMIC HASH 32 A: THE FASTEST 32-BIT, OAAT HASHING ALGORITHM VERSUS
| CDB AND DJB2

While I doubt there's a performance improvement at all and if there is
it won't be measurable in this context, reading the footer of that page
makes me wonder whether the given algorithm is suitable for use in a GPL
licensed project to begin with.

Cheers, Phil

      reply	other threads:[~2025-03-14 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANBG-UO0xoUQq_yah=mLQWfvNQQwJng8y5UPkMSF9daYfQGe-g@mail.gmail.com>
2025-03-13 20:11 ` Replacing DJB2 Hash Florian Westphal
2025-03-14 17:56   ` Phil Sutter [this message]

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=Z9RtzLnczdxnY2aG@orbyte.nwl.cc \
    --to=p.ozlabs@nwl.cc \
    --cc=entrocraft@gmail.com \
    --cc=fw@strlen.de \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=regit@netfilter.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).