Re: [PATCH/RFC] hash: Let gcc decide how to multiply

2014-08-26 Thread Rasmus Villemoes
David Miller writes: > From: Daniel Borkmann > 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

Re: [PATCH/RFC] hash: Let gcc decide how to multiply

2014-08-26 Thread Rasmus Villemoes
David Miller da...@davemloft.net writes: From: Daniel Borkmann dbork...@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

Re: [PATCH/RFC] hash: Let gcc decide how to multiply

2014-08-25 Thread David Miller
From: Daniel Borkmann 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

Re: [PATCH/RFC] hash: Let gcc decide how to multiply

2014-08-25 Thread Daniel Borkmann
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

[PATCH/RFC] hash: Let gcc decide how to multiply

2014-08-25 Thread Rasmus Villemoes
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. A stupid micro-benchmark [3] on my x86_64 machine shows that letting gcc

[PATCH/RFC] hash: Let gcc decide how to multiply

2014-08-25 Thread Rasmus Villemoes
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. A stupid micro-benchmark [3] on my x86_64 machine shows that letting gcc

Re: [PATCH/RFC] hash: Let gcc decide how to multiply

2014-08-25 Thread Daniel Borkmann
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

Re: [PATCH/RFC] hash: Let gcc decide how to multiply

2014-08-25 Thread David Miller
From: Daniel Borkmann dbork...@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,