This PR introduces updates to fastrand's Wyrand algorithm, primarily using updated constants from the final v4.2 implementation of wyhash. This modification of the constants means the output of the generator is different, hence the breaking change. Based on the C reference, the new constants are generated using the same secrets algorithm but with a modification to ensure the constants are also large prime numbers. This additional property has helped improve the quality of the hashing for wyhash and the reference wyrand function.
Given the wide usage of fastrand, improving the quality of the generated output will be a nice plus, especially if it does not involve any performance hits (since fastrand is about being fast). But it will necessitate a new major version as anyone relying on deterministic output will have different generated sequences compared to before.
BREAKING CHANGE
This PR introduces updates to
fastrand
's Wyrand algorithm, primarily using updated constants from the final v4.2 implementation ofwyhash
. This modification of the constants means the output of the generator is different, hence the breaking change. Based on the C reference, the new constants are generated using the same secrets algorithm but with a modification to ensure the constants are also large prime numbers. This additional property has helped improve the quality of the hashing for wyhash and the referencewyrand
function.Given the wide usage of
fastrand
, improving the quality of the generated output will be a nice plus, especially if it does not involve any performance hits (sincefastrand
is about being fast). But it will necessitate a new major version as anyone relying on deterministic output will have different generated sequences compared to before.Reference: C reference
wyrand
function