aappleby/smhasher

Quality Score

michaelpasieka opened this issue · 5 comments

While researching various hash algorithms, I constantly see Q-score or Quality Score -- mostly 10/10.

After downloading, compiling and running SMHasher, I cannot find a reference to this score or how to compute such. I am also failing to find any description online.

Can you point me at such a description?

If you meant this one - https://github.com/Cyan4973/xxHash

Then as the description said:

Q.Score is a measure of quality of the hash function. It depends on successfully passing SMHasher test set. 10 is a perfect score.

So to check any other function, just extend the main.cpp (e. g. with new hash-function), compile and start it.
For example:

mkdir smhasher/build/
cd smhasher/build/
g++ -O2 -o test ../src/*.cpp ../src/*.c
./test "your-hash-function-name"

If you'll see everywhere PASS (resp. not see ...**FAIL**...) for this function, then the "Q-score" will be 10.

Note, depending on the CPU-performance, the tests can take a long time (very long)...

I found 17 FAIL messages and thought it likely that, if none are printed, then score was 10/10.

What about a 7? Is it a straight percentage of those 17?

Thanks for your quick response.

What about a 7?

what it is exactly?

The table everyone refers to is xxhash:Benchmarks. How does one compute a Q-Score for FNV of 5, for example?

Well, why do you not ask him? :)
I assume some test-failures have there just fewer precedence...