consensus/utils/xorshift64star.go
DataHoarder 2ad5e1ba38
All checks were successful
continuous-integration/drone/push Build is passing
Sync speed improvements by better crypto cache
2023-05-23 09:38:09 +02:00

11 lines
269 B
Go

package utils
// XorShift64Star Implementation of xorshift* https://en.wikipedia.org/wiki/Xorshift#xorshift*
// x must be initialized to a non-zero value
func XorShift64Star(x uint64) uint64 {
x ^= x >> 12
x ^= x << 25
x ^= x >> 27
return x * 0x2545F4914F6CDD1D
}