Created
January 5, 2026 10:50
-
-
Save RYSF13/b3a610263c4916e7079dde77244d82dd to your computer and use it in GitHub Desktop.
A simple custom 32-bit non-cryptographic hash function in C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // R01-hash | |
| r01h(d,l)char*d;{int h=0x9E3779B1;for(i=0;i<l;i++)h=(h<<5)|(h>>27),h^= | |
| d[i],h+=(h<<12)^(h>>22),h*=0xCC9E2D51;h^=h>>17;h*=0x1B873593;h^=h>>3;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment