SFMT pseudo random number generator for Erlang

  • Authors:
  • Kenji Rikitake

  • Affiliations:
  • Kyoto University, Kyoto, Japan

  • Venue:
  • Proceedings of the 10th ACM SIGPLAN workshop on Erlang
  • Year:
  • 2011

Quantified Score

Hi-index 0.01

Visualization

Abstract

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.