netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org, Jay Vosburgh <jay.vosburgh@canonical.com>,
	Thomas Graf <tgraf@suug.ch>,
	Daniel Borkmann <dborkman@redhat.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] arch_fast_hash: avoid indirect function calls and implement hash in asm
Date: Thu, 04 Dec 2014 17:37:10 +0100	[thread overview]
Message-ID: <1417711030.5386.35.camel@localhost> (raw)
In-Reply-To: <20141204155610.GA22340@gondor.apana.org.au>

On Do, 2014-12-04 at 23:56 +0800, Herbert Xu wrote:
> On Thu, Dec 04, 2014 at 02:08:50PM +0100, Hannes Frederic Sowa wrote:
> > By default the arch_fast_hash hashing function pointers are initialized
> > to jhash(2). If during boot-up a CPU with SSE4.2 is detected they get
> > updated to the CRC32 ones. This dispatching scheme incurs a function
> > pointer lookup and indirect call for every hashing operation.
> 
> Just curious, is jhash actually faster than generic C CRC32 on
> common platforms?

Yes, jhash always beats crc32 in software on x86_64 and ia32.

Bye,
Hannes

  reply	other threads:[~2014-12-04 16:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04 13:08 [PATCH net-next] arch_fast_hash: avoid indirect function calls and implement hash in asm Hannes Frederic Sowa
2014-12-04 15:56 ` Herbert Xu
2014-12-04 16:37   ` Hannes Frederic Sowa [this message]
2014-12-04 19:27 ` Jay Vosburgh
2014-12-04 19:32   ` Hannes Frederic Sowa
2014-12-09 19:39 ` David Miller

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=1417711030.5386.35.camel@localhost \
    --to=hannes@stressinduktion.org \
    --cc=dborkman@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jay.vosburgh@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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).