Skip to content

js42721/fastrandom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastRandom

A faster, more "random" alternative to java.util.Random. It includes the following non-cryptographic pseudorandom number generators:

  • Mersenne Twister - a 623-dimensionally equidistributed generator with a period of 219937 - 1 by Matsumoto and Nishimura.
  • Taus88 - a maximally equidistributed linear feedback shift register by L'Ecuyer.
  • WELL512a - part of the WELL (Well Equidistributed Long-period Linear) series by L'Ecuyer, Matsumoto, and Panneton.

All of these generators perform favorably on statistical tests of randomness and are suitable for simulations and most other non-cryptographic uses.

Use the information in the table below to determine which generator is most appropriate for your use case. The time column shows the time required to produce 109 numbers on a 2 GHz Intel Core 2 Duo.

Name Period State size (words) Time (s)
Mersenne Twister 219937 - 1 624 6.4
Taus88 ~288 3 5.3
WELL512a 2512 - 1 16 7.3

Releases

No releases published

Packages

No packages published

Languages