skeeto / hash-prospector

Automated integer hash function discovery
The Unlicense
672 stars 27 forks source link

Are score of 32bit and 16bit hashes with the same unit? #9

Closed gzm55 closed 3 years ago

gzm55 commented 3 years ago

In prospector.c for searching 32/64 bits hashes, the scores are multiplied by 1000.0, while not in the hp16.c.

Is it on purpose?

skeeto commented 3 years ago

I did that before to scale the value closer to 1 for convenience. The scores are already incomparable between categories (16-bit exact, 32-bit exact, 64-bit exact, 32-bit estimate, 64-bit estimate) and are only intended as a relative comparison between functions within a category. I just chose not to do it in hp16.c.