gjrand boasting page.

Gjrand is free software (GPL v2 or v3) hosted at SourceForge.

The SourceForge project page:
SourceForge.net Logo

Downloads.

gjrand home.

Pseudo-random number generator.

Quality.

Features.

Speed.

Version 3.3.0 on a 64 bit AMD Athlon:
uniform random bytes
2.2 clock cycles per byte. (If you don't care about consistent byte ordering across platforms you can go about 1 clock cycle per byte using C's weak typeing to put integers into a byte array.)
uniform 32 bit integers
16 clock cycles per number one at a time.
4 clock cycles per number in bulk.
uniform 64 bit integers
16 clock cycles per number one at a time.
7 clock cycles per number in bulk.
uniform single precision reals in (0, 1)
8 clock cycles per number in bulk.
uniform double precision reals in (0, 1)
18 clock cycles per number one at a time.
12 clock cycles per number in bulk.
uniform 80 bit extended precision reals in (0, 1)
61 clock cycles per number one at a time.
standard normal variates double precision real
66 clock cycles per variate one at a time.
14 clock cycles per variate in bulk.
This is probably not the fastest pseudo-random number library in existence, but i claim it's faster than many, and fast enough for most purposes.

It's slower on 32 bit computers. I don't have measurements for recent versions, but 1.5 to 5 times slower for various calls seems plausible.

Limitations.

Don't use gjrand for high security applications such as cryptography, or as the random generator for gambling for actual money. The generator algorithm, seeding methods, API, and coding style are all wrong for such use.

Random number test suites.

The gjrand package also contains statistical testing programs that can be used to test the gjrand library, or other supposedly random data:

I like to think the first three are quite tough and reasonably fast for the amount of statistical power they have. In particular, the first two reject some well known pseudo-random number generators that pass some other well known test suites and retain good reputations.

These suites read raw binary numbers from standard input. (On most systems the best way is to write a program that writes binary numbers from your chosen generator to standard output and then use a pipe. Examples are provided.) I like this because it can test generators written in different languages or programming paradigms without needing any common ground other than simple binary I/O.