4 ms·
Haskell doesn't use the libc standard number generator. The implementation is here: http://hackage.haskell.org/packages/archive/random/1.0.1.1/doc/html/src/Sys
by danieldk 13y ago
Haskell doesn't use the libc standard number generator. The implementation is here:
http://hackage.haskell.org/packages/archive/random/1.0.1.1/doc/html/src/System-Random.html http://hackage.haskell.org/packages/archive/random/1.0.1.1/d...
Go's implementation is here and doesn't use the libc generator either:
http://golang.org/src/pkg/math/rand/rng.go http://golang.org/src/pkg/math/rand/rng.go
Walter Bright has already commented on D.
it's mostly a test of random number generation and presumably all of those languages use libc's random number generator
In fact, that would be better than benchmarking different PRNG methods, as it's done now ;).
Anyway, I think the benchmark is still fair, since the programs use whatever the default implementation for a PRNG is in the language's standard library. Sure, the Haskell program will be faster if you'd usea MWC or MT implementation from Hackage. But you'd expect a standard library to come with a sensible default ;).