Re: [ovs-dev] [PATCH 2/2] lib/hash: Use CRC32 for hashing.

2014-07-07 Thread Ben Pfaff
On Fri, Jul 04, 2014 at 11:55:30AM -0700, Jarno Rajahalme wrote: > > On Jun 12, 2014, at 1:31 PM, Ben Pfaff wrote: > > > On Wed, Jun 04, 2014 at 04:32:21PM -0700, Jarno Rajahalme wrote: > >> Use CRC32 intrinsics for hash computations when building for > >> X86_64 with SSE4_2. > >> > >> Signed-o

Re: [ovs-dev] [PATCH 2/2] lib/hash: Use CRC32 for hashing.

2014-07-04 Thread Jarno Rajahalme
On Jun 12, 2014, at 1:31 PM, Ben Pfaff wrote: > On Wed, Jun 04, 2014 at 04:32:21PM -0700, Jarno Rajahalme wrote: >> Use CRC32 intrinsics for hash computations when building for >> X86_64 with SSE4_2. >> >> Signed-off-by: Jarno Rajahalme > > Did you consider using __builtin_constant_p() to inl

Re: [ovs-dev] [PATCH 2/2] lib/hash: Use CRC32 for hashing.

2014-06-12 Thread Ben Pfaff
On Wed, Jun 04, 2014 at 04:32:21PM -0700, Jarno Rajahalme wrote: > Use CRC32 intrinsics for hash computations when building for > X86_64 with SSE4_2. > > Signed-off-by: Jarno Rajahalme Did you consider using __builtin_constant_p() to inline the hash computation only when the number of words is a

[ovs-dev] [PATCH 2/2] lib/hash: Use CRC32 for hashing.

2014-06-04 Thread Jarno Rajahalme
Use CRC32 intrinsics for hash computations when building for X86_64 with SSE4_2. Signed-off-by: Jarno Rajahalme --- lib/hash.c| 15 - lib/hash.h| 167 - tests/test-hash.c | 11 +++- 3 files changed, 163 insertions(+), 3