This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] Add an abstract incremental hash data type


> So there will be at most one hash implementation? 

One per binary I expect. Modern hash functions are pretty good,
so it's unlikely that someone needs to come up with special
purpose hashes.

I found Bob Jenkins' spooky is rather good for this case (very
large incremential keys), but it is only efficient on 64bit hosts.

So it would need a fallback (like mumurhash2a or the existing one) on 32bit.

Another alternative would be to use CityHash, but that also has multiple
variants, including some machine specific ones (e.g. use the CRC
instructions on SSE2 hosts)

> Maybe use a namespace instead of a hash then?

I don't understand the suggestion.

> So other places can extend it?

Not sure that is needed.

> Why didn't you replace the tree.c uses BTW?

Patches were already quite big, but I'll add it.

-Andi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]