Random number generators
pfg at FreeBSD.org
Tue Mar 17 04:25:32 UTC 2015
FreeBSD libc random functions are not too bad but in general I was having some thoughts about how the random generator functions in libc are slow and predictable and how just about every application nowadays is including "Mersenne Twister" or similar algorithms (which are fast and better in every way but can’t be adapted for the C API) in their applications.
OpenBSD did something drastic about it , breaking standards and compatibility and whatnot.
I wouldn’t go there and I don’t think there is any real “solution” for this. The musl libc guys tried something interesting though. They took the tempering function from MT:
It should be something relatively easy to try on our implementation too, if someone feels like running the tests and measuring if there is a difference.
More information about the freebsd-numerics