Abyss

Abyss™ is the hyper-fast 64-bit PRNG that passes all Dieharder tests and fails many PractRand tests.

The Dieharder test suite is a reasonable standard for robust non-cryptographic PRNGs that trade off subtle statistical anomaly resilience for extra speed efficiency.

The following non-cryptographic PRNG library can be implemented after proprietary license compliance.

Implementation

Abyss™ was implemented in C (requiring the stdint.h header to define a 64-bit, unsigned integral type for uint64_t).

Each Abyss™ variant has both a minimum period of at least 2⁶⁴ and reversibility.

#include <stdint.h> struct abyss128_state { uint64_t output[2]; uint64_t a; uint64_t b; }; struct abyss256_state { uint64_t output[4]; uint64_t a; uint64_t b; uint64_t c; uint64_t d; }; void abyss128(struct abyss128_state *s) { s->a = ((s->a << 23) | (s->a >> 41)) ^ s->b; s->b += 111111111111111111; s->output[0] = s->a + s->b; s->output[1] = ((s->a << 47) | (s->a >> 17)) ^ s->b; } void abyss256(struct abyss256_state *s) { s->a = ((s->a << 25) | (s->a >> 39)) ^ s->b; s->b += 11111111111111111; s->c += s->a; s->d = ((s->d << 51) | (s->d >> 13)) + s->a; s->output[0] = s->a + s->b; s->output[1] = ((s->a << 47) | (s->a >> 17)) ^ s->b; s->output[2] = s->c; s->output[3] = s->d; }

Reference

The abyss128 function modifies the state in a struct abyss128_state instance to generate 2 pseudorandom uint64_t integers in the output array.

Each state variable (a and b) in a struct abyss128_state instance must be seeded (before generating a deterministic abyss128 sequence).

The abyss256 function modifies the state in a struct abyss256_state instance to generate 4 pseudorandom uint64_t integers in the output array.

Each state variable (a, b, c and d) in a struct abyss256_state instance must be seeded (before generating a deterministic abyss256 sequence).

Randomness

Each Abyss™ variant passes the latest Dieharder 3.31.1 tests.

A PRNG that "passes Dieharder" has no FAILED results in at least 1 full set of dieharder -Y 1 -a -g 200 -k 2 tests.

Speed

Abyss™ speed tests generate (and hash) 1 billion pseudorandom uint64_t integers in a #pragma GCC unroll 0 loop.

Each of the following results log the fastest process execution speed (from an AMD A4-9120C with gcc -O3) among several repetitions of the aforementioned test.

abyss64 was replaced by blastcircuit.

abyss128 was 164ms faster than recoilfuse.

abyss256 was 334ms faster than recoilfuse and 170ms faster than flurrygrid.