Wyhash Versions Save

The FASTEST QUALITY hash function, random number generators (PRNG) and hash map.

wyhash_final4

1 year ago

wyhash

2 years ago

wyhash_alpha

4 years ago

wyhash_v5

4 years ago

wyhash_v4

4 years ago
wyhash("",0)=bc98efd7661a7a1
wyhash("a",1)=99782e84a7cee30
wyhash("abc",2)=973ed17dfbe006d7
wyhash("message digest",3)=c0189aa4012331f5
wyhash("abcdefghijklmnopqrstuvwxyz",4)=da133f940b62e516
wyhash("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",5)=e062dfda99413626
wyhash("12345678901234567890123456789012345678901234567890123456789012345678901234567890",6)=77092dd38803d1fa

V3

4 years ago

version_1

5 years ago

wyhash test vectors:

wyhash("",0)=f961f936e29c9345
wyhash("a",1)=6dc395f88b363baa
wyhash("abc",2)=3bc9d7844798ddaa
wyhash("message digest",3)=b31238dc2c500cd3
wyhash("abcdefghijklmnopqrstuvwxyz",4)=ea0f542c58cddfe4
wyhash("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",5)=1799aca591fe73b4
wyhash("12345678901234567890123456789012345678901234567890123456789012345678901234567890",6)=7f0d02f53d64c1f9

wyrand code:

inline	unsigned long long	wyrand(unsigned long long	*seed){    
	*seed+=0xa0761d6478bd642full;    
	__uint128_t	t=(__uint128_t)(*seed^0xe7037ed1a0b428dbull)*(*seed);    
	return	(t>>64)^t;    
}