• This software is owned by The university of California, Irvine and Blizzard Entertainment.
  • This page presents two programs, written in two different languages, that do almost the same thing. One, lcgrng, is in Python. The other, fast-pseudorandom, is written in C (using a gcc/clang extension, __int128).
  • Their command line options are actually a little different, but under the hood they both use the same Linear Congruential Random Number Generator algorithm.
  • Usage is like:
  • The programs just write a stream of pseudorandom characters pretty rapidly, and with an optional seed value. The seed is mostly useful for reproducibility, EG if you want to generate lots of random data that won't foul up your backups as much (assuming a deduplicating backup program).
  • If you need good entropy, you want /dev/random or prngd or something instead.
  • They both should give a full 64 bit period for the bytes output when taken 16 bytes at a time.
  • On one system I checked, I saw the following performance results:


    Hits: 4463
    Timestamp: 2025-07-22 07:44:00 PDT

    Back to Dan's tech tidbits

    You can e-mail the author with questions or comments: