mzHash32 #25
Replies: 2 comments
-
|
I'm testing a further version of mzHash32 (6 - the final one) that further improves the collision count, getting very close to the ideal universal hash function. It's only slightly different, but I'll report it in the issues. |
Beta Was this translation helpful? Give feedback.
-
|
That 3byte back and forth shift is a really creative way to handle the sign bit. Yet, assuming the input bytes are randomly distributed you have to perform 2 unnecessary shifts in 50% of the cases. And in the other 50% you could do a single bitwise OR with a bit mask that has all bits set to 1 in the places where the signed right shift would put them. Maybe I'm wrong, but I think you could save 75% time (minus the cost of performing a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My JavaScript port of mzHash32 v0.5 (2026-01-05).
It works even with pre-ES6 engines like JScript.
Original author is Matteo Zapparoli aka @matteo65.
Beta Was this translation helpful? Give feedback.
All reactions