Will it pass the SuperCrush U01 tests? How fast will it be? http://www.iro.umontreal.ca/~simardr/testu01/tu01.html I have not run it thru randomness tests, but I crudely timed it for NumWordsInState=4 (period=2^256) on 64-bit iMac 2.0GHz, finding it produced random 64-bit words at a rate of 1 billion in 12 seconds, which is 3 cycles per random byte. Perhaps fiddling with the code and compiler would make it go faster? I manually unrolled loop and replaced the state 4-vector by 4 scalars; that sped it up to under 11 seconds. Another idea is to output more than one random word each time, which might mean you need a larger state vector but still in net could yield a speedup... --- #include <stdint.h> #include <stdio.h> //Warren D. Smith attempt at making psu-random generator. Compile with // gcc WarrenRand.c -Wall -O6 -o WarrenRand #define uint unsigned int #define uint32 uint32_t #define uint64 uint64_t #define uint128 __uint128_t #define RandStrideConst 14923729446516375051ull //must be odd //The below is written for a 64-bit machine. //If you have 32-bit machine then text-replace 64-->32 and then 128-->64 throughout the following: //period will be 2^(64 * NumWordsInState), increase for more randomness but slower runtime: #define NumWordsInState 4 inline uint64 UpdatorF(uint64 x){ uint128 y; y = x; x >>= (64-1); y *= y; x += y ^ (y>>64); return(x); } uint64 statevec[NumWordsInState]; uint64 Rand64(){ uint i; uint64 v; v = statevec[0]; for(i=NumWordsInState-1; i>0; i--){ //can be unrolled and all loop iterations run parallel v ^= statevec[i]; statevec[i] += UpdatorF(statevec[i-1]); } statevec[0] += RandStrideConst; return(v); //returns the XOR of all words in state vector } main(){ uint i; for(i=0; i<9999; i++){ Rand64(); } //warm it up for(i=0; i<99; i++){ printf("%llx\n", Rand64()); } //print some random machine words }