Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote:
>>Incidentally, using a prime module to hash a pointer sounds fine to me,
>>it just means that the modulo is part of the hash function. The only
>Multiplying with a suitable prime and then shifting and masking would
>most likely be of similar strength, but be much cheaper cpu-wise.
Silly of me to forget, yes.
The mother of all PRNGs: seednew = seedold * 67067
(in unsigned 32-bit overflowing arithmetic) should do fine for most
applications.
--
Sincerely,
Stephen R. van den Berg.
"Make it as simple as possible. And no simpler."