32 ms·
Is there any particular reason why this straightforward implementation of a well-known PRNG (published by Marsaglia 20 years ago) is worth being linked from HN'
by teo_zero 2y ago
Is there any particular reason why this straightforward implementation of a well-known PRNG (published by Marsaglia 20 years ago) is worth being linked from HN's first page?
- sjmulder 2y agoMight be because of the very similar PRNG used in Advent of Code two weeks ago: secret = (secret ^ secret << 6) & 0xFFFFFF; secret = (secret ^ secret >> 5) & 0xFFFFFF; secret = (secret ^ secret << 11) & 0xFFFFFF; https://adventofcode.com/2024/day/22 https://adventofcode.com/2024/day/22