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

Ben Pfaff blp at nicira.com
Mon Jul 7 15:11:40 UTC 2014


On Fri, Jul 04, 2014 at 11:55:30AM -0700, Jarno Rajahalme wrote:
> 
> On Jun 12, 2014, at 1:31 PM, Ben Pfaff <blp at nicira.com> 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 <jrajahalme at nicira.com>
> > 
> > Did you consider using __builtin_constant_p() to inline the hash
> > computation only when the number of words is a constant?  (On MSVC,
> > which doesn't have __builtin_constant_p(), you could default to always
> > inlining or never inlining, since this is not a correctness issue.)
> 
> You mean like this:

Right, that's what I mean.



More information about the dev mailing list