sfmt pseudo random number generator for erlang
The stock implementation of Erlang/OTP pseudo random number generator (PRNG), random module, is based on an algorithm developed in 1980s called AS183, and has known statistic deficiencies for large-scale applications. Using modern PRNG algorithms with longer generation periods reduces the deficiencies. This paper is a case study of sfmt-erlang module, an implementation of SIMD-oriented Fast Mersenne Twister (SFMT) PRNG with the native interface functions (NIFs) of Erlang. The test results show the execution speed of the implementation is approximately three times faster than the random module on the x86 and x86_64 architecture computers, and the execution own time for generating single random number sequences is proportional to the internal state table length.
sfmt pseudo random number generator erlang mersenne twister nif