PractRand High-Throughput PRNG Suite

Chris Doty-Humphrey's PractRand — a high-throughput PRNG testing framework designed to run continuously and detect failure at arbitrary data volumes. Evaluates generators across gap, folding floating-point, Bayesian count frequency, differential count, binary matrix rank, and autocorrelation tests.

Continuous Volume Testing: PractRand by Chris Doty-Humphrey is uniquely designed to run at arbitrary data volumes — from kilobytes to terabytes — detecting failure points precisely. A good PRNG should pass PractRand through at least 32 TB of output without anomalies.

PractRand Test Battery (PR01–PR10)

PractRand applies tests at three bit-level extraction planes — Low1/8, Low4/8, and Low8/8 — to expose generators that pass on full-width output but fail when only the lowest bits are examined:

IDTest NameExtractionPass CriteriaDescription
PR01Gap-16:BLow1/8Uncorrelated gapsGap distribution between matching 16-bit values at lowest byte (planned).
PR02FPF-16:BLow1/8Folding floating pointFolded floating-point frequency test at 16-bit low-byte (planned).
PR03BCFN(2+0,13/64)Low1/8Bayesian count freqBayesian count-frequency normality test, base configuration (planned).
PR04BCFN(2+1,13/64)Low1/8Shifted count freqBayesian count-frequency test with 1-bit shift (planned).
PR05DC6-9x1Bytes-1Low4/8Differential countDifferential count test across 9 single-byte channels (planned).
PR06BRank(12)Low4/8Binary matrix rankBinary matrix rank of 12-row sub-matrices (planned).
PR07FPF-8:all64kLow8/8Full stream FPFFolded floating-point across full 64K 8-bit output range (planned).
PR08Dist-64x2:gLow8/8Distribution metric2D distribution metric of 64-element groups (planned).
PR09Gap-8:all64kLow8/8Extended gap countsExtended gap counts across full 8-bit output range (planned).
PR10AutoCor-64Low8/8Autocorrelation lagLag-64 autocorrelation test on full output stream (planned).

[!NOTE]
All 10 tests are currently in specification stage and display as NOT IMPLEMENTED. The WebAssembly backend for PractRand’s multi-plane extraction algorithms is planned for an upcoming release.

Bit-Plane Extraction

PractRand’s defining feature is its bit-plane stratification. Many generators pass full-width tests but carry detectable structure in their lowest bits:

  • Low1/8 — tests only the lowest 1-of-8 bits per byte
  • Low4/8 — tests the lowest 4-of-8 bits per byte
  • Low8/8 — full-width test on all 8 bits per byte

When to Use PractRand

  1. Ultra-High-Volume PRNG Stress Testing: Running generators through terabytes of output to find failure points — Mersenne Twister typically fails PractRand around 32 GB; xoshiro256** passes beyond 32 TB. This is the industry standard for PRNG period exhaustion testing.
  2. Low-Bit Quality Auditing: Many simulation frameworks (Monte Carlo, molecular dynamics) only use the lower bits of 64-bit generator output for efficiency. PractRand’s Low1/8 and Low4/8 tests directly verify the quality of these truncated outputs.
  3. Game Engine PRNG Certification: Validating that PRNG outputs used for procedural generation, physics simulation noise, and AI decision-making remain statistically uniform even after billions of calls without reseed.
  4. Custom PRNG Research: Evaluating novel LCG, LFSR, or cellular automaton-based generators as part of academic research — PractRand’s continuous streaming model naturally fits iterative generator evaluation.

Volume Benchmarks: The PRNG community uses PractRand pass/fail volumes as a standard quality benchmark. A generator is considered high quality if it passes at 32 TB, medium quality at 1 TB, and weak if it fails below 1 GB. Cryptographic-grade generators (ChaCha20, AES-CTR) pass indefinitely.

Coming Soon: All 10 PractRand tests are queued for implementation. The WebAssembly port of PractRand’s multi-plane bit-extraction and BCFN algorithms is in progress for a future release.