4 ms·
Constant time stateless shuffling and grouping
- zX41ZdbW 3y agoIt is the same method that I use in clickhouse-obfuscator: https://github.com/ClickHouse/ClickHouse/tree/master/programs/obfuscator https://github.com/ClickHouse/ClickHouse/tree/master/program...
- bhickey 3y ago> The round function can use anything, including destructive operations, so a nice fast hash like PCG is a good choice. PCG isn't a hash. Maybe they meant FNV?
- karmakaze 3y agoI searched "PCG Hash" and found this as part of a shader: uint PCGHash() { rng_state = rng_state * 747796405u + 2891336453u; uint state = rng_state; uint word = ((state >> ((state >> 28u) + 4u)) ^ state) * 277803737u; return (word >> 22u) ^ word; } This doesn't look like FNV or any other hash function I know.