From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: David Miller <davem@davemloft.net>
Cc: dborkman@redhat.com, ffusco@redhat.com, tgraf@suug.ch,
linux-kernel@vger.kernel.org, matthew@wil.cx, wli@holomorphy.com,
akpm@linux-foundation.org, nyc@holomorphy.com
Subject: Re: [PATCH/RFC] hash: Let gcc decide how to multiply
Date: Tue, 26 Aug 2014 10:17:57 +0200 [thread overview]
Message-ID: <87sikjhdfu.fsf@rasmusvillemoes.dk> (raw)
In-Reply-To: <20140825.114754.1052522152538122040.davem@davemloft.net> (David Miller's message of "Mon, 25 Aug 2014 11:47:54 -0700 (PDT)")
David Miller <davem@davemloft.net> writes:
> From: Daniel Borkmann <dborkman@redhat.com>
> Date: Mon, 25 Aug 2014 14:58:37 +0200
>
>> On 08/25/2014 02:13 PM, Rasmus Villemoes wrote:
>>> A 9+ years old comment in hash_64 says that gcc can't optimize
>>> multiplication by GOLDEN_RATIO_PRIME_64. Well, compilers get smarter
>>> and CPUs get faster all the time, so it is perhaps about time to
>>> revisit that assumption.
>>
>> Seems fine by me, but Cc'ing a couple of others (as those you have
>> Cc'ed haven't written that code :)). You might want to let your
>> changes go via Andrew's tree, too, perhaps ...
>
> You need to test the code generation for a cpu where the multiply
> instruction is more expensive than the shifts and adds.
Yes, I should, but I'm afraid I can't. I only have x86 hardware, and
even if I managed to set up some cross-compiler toolchain, I wouldn't
know what CPUs to target. So I was hoping someone else could test this
on appropriate platforms.
Thanks,
Rasmus
prev parent reply other threads:[~2014-08-26 8:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 12:13 Rasmus Villemoes
2014-08-25 12:58 ` Daniel Borkmann
2014-08-25 18:47 ` David Miller
2014-08-26 8:17 ` Rasmus Villemoes [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=87sikjhdfu.fsf@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=ffusco@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=nyc@holomorphy.com \
--cc=tgraf@suug.ch \
--cc=wli@holomorphy.com \
/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
all inboxes | Powered by JetHome®