[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gsync/libihash hash function

From: Justus Winter
Subject: Re: gsync/libihash hash function
Date: Sat, 05 Nov 2016 14:02:19 +0100


"Brent W. Baccala" <cosine@freesoft.org> writes:
> libihash has a similar issue.  It seems to use no hash function by default,

The main performance critical use of libihash was to map port names
(which are mostly consecutive small integers) to objects.  I spent some
time optimizing libihash for that use case, and using a hash function
other than computing the remainder using bit masks was considerably
slower.  Nowadays we use protected payloads to map ports to objects, and
libihash involved into a more general-purpose hash table implementation.

> but provides Murmur3 if you want it, which looks better than just shifting
> bits, but also slower.

This was added to hash non-integer keys.

> I've been looking at the CRC32 instruction, which was introduced ten years
> ago in SSE 4.2.  According to the Intel Software Developer's Manual, CRC32
> works like this:

Richard wrote a micro-benchmark, you can find it on darnassus.

> It seems a bit silly to agonize over performance when we've got so many
> other issues,

Not at all.  Performance is important, and requires doing many small
things right.


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]