5 ms·
D doesn't use libc's random number generator because the C standard one isn't very random. http://dlang.org/phobos/std_random.html http://dlang.org/phobos/std_
by WalterBright 13y ago
D doesn't use libc's random number generator because the C standard one isn't very random.
http://dlang.org/phobos/std_random.html http://dlang.org/phobos/std_random.html
Of course, a better random number generator takes longer to compute. The blog's author switched the D version to use libc's random number generator, and got some significant speedups.
http://www.reddit.com/r/programming/comments/1ixnf6/benchmarking_roguelike_level_generation_go_rust/cb942jo http://www.reddit.com/r/programming/comments/1ixnf6/benchmar...