lkml.org 
[lkml]   [2014]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH/RFC] hash: Let gcc decide how to multiply
Date
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


\
 
 \ /
  Last update: 2014-08-26 10:41    [W:0.046 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site