News for hackers. Stuff that matters.
Re:MetroHash: Faster, Better Hash Functions by jedisct1 on Wednesday May 27, 2015 @03:48PM (#9613851)
How does it compare to xxHash? https://github.com/Cyan4973/xxHash

Comparing MetroHash to CityHash is not really fair. Why would anyone use CityHash in 2015?

Re:MetroHash: Faster, Better Hash Functions by jandrewrogers on Wednesday May 27, 2015 @04:37PM (#9614158)
With respect to xxHash64, the closest (and slowest) algorithm is Metro64. I just ran it on my laptop using SMHasher for comparison purposes.

- Metro64 is about 10-15% faster for bulk hashing

- Metro64 is about 2x faster for small keys

- Metro64 has better statistical quality

These days, most people should be using 128-bit hash functions. Not only are they more collision resistant, they also run faster on modern microarchitectures.

Measuring CityHash at 32-bits is not a realistic measurement of its performance. Its structure is optimized for 64-128 bit hashes, which it actually does quite well for some types of keys.

Re:MetroHash: Faster, Better Hash Functions by rurban on Thursday May 28, 2015 @09:51AM (#9618105)
Most is true, but:

128-bit hash functions for hash table makes no sense, unless you have 1TB tables in external memory. And for security 128 is peanuts, you start with 256 there.

First you need 4x more space, when you store the hash also for faster collision checks. 32bit is normal. cache size is more important than cpu mostly.

Second, collision resistancy on normal sized hash tables take only the first 7-15 bits, so calculating the other 113 bits makes not much sense. 32 bit is usually enough unless you need huge tables, where 64bit is enough.

Re:MetroHash: Faster, Better Hash Functions by rurban on Thursday May 28, 2015 @09:42AM (#9618048)
My smhasher fork has both: https://github.com/rurban/smhasher/

Comparable results for xxHash and the new metrohash will be uploaded soon. These things take time.

But I'm more interested in comparing it to HW CRC32-C, the fastest and best hash so far, 2x faster than metro.

Re:MetroHash: Faster, Better Hash Functions by gpakosz on Friday May 29, 2015 @04:20AM (#9623369)
For the record, CRC32-C doesn't appear in your summary table
Re:MetroHash: Faster, Better Hash Functions by cbsmith on Wednesday May 27, 2015 @09:25PM (#9615542)
I do it all the time. CityHash has been around long enough that it is broadly included in most hash suites on most platforms, but is new enough that it doesn't suck as bad as its predecessors.
Re:MetroHash: Faster, Better Hash Functions by gojomo on Wednesday May 27, 2015 @04:20PM (#9614043)
It looks like 'FarmHash' is the successor from the CityHash authors. Does xxHash have 128/256-bit variants?