Unity Helpers

Logo

Treasure chest of Unity developer tools. Professional inspector tooling, high-performance utilities, spatial queries, and 20+ editor tools.

Random Number Generator Performance Benchmarks

Auto-generated via RandomPerformanceTests.Benchmark. Run the test to refresh these summary and detail tables.

Summary (fastest first)

Random NextUint (ops/s) Speed Quality Notes
LinearCongruentialGenerator1,309,300,000FastestPoorMinimal standard LCG; fails spectral tests and exhibits lattice artifacts beyond small dimensions.
WaveSplatRandom1,159,700,000Very FastExperimentalSingle-word chaotic generator; author notes period 2^64 but provides no formal test results—treat as experimental.
SplitMix641,048,800,000Very FastVery GoodWell-known SplitMix64 mixer; passes TestU01 BigCrush and PractRand up to large data sizes in literature. Vigna 2014
BlastCircuitRandom1,037,300,000Very FastGoodEmpirical PractRand testing to 32GB shows strong diffusion; designed as a chaotic ARX mixer rather than a proven statistically optimal generator.
FlurryBurstRandom938,900,000FastExcellentHybrid Xoshiro/PCG variant tuned for all-around use; passes TestU01 BigCrush per upstream reference implementation. Blackman & Vigna 2019
PcgRandom905,200,000FastExcellentPCG XSH RR 64/32 variant; passes TestU01 BigCrush and PractRand in published results. O'Neill 2014
IllusionFlow882,600,000FastExcellentHybridized PCG + xorshift design; upstream PractRand 64GB passes with no anomalies per author.
RomuDuo757,300,000FastVery GoodROMU family member (RomuDuo); authors report strong BigCrush results with minor low-bit weaknesses in some rotations.
XoroShiroRandom755,300,000FastVery Goodxoshiro128** variant; authors recommend for general-purpose use and report clean BigCrush performance with jump functions. Blackman & Vigna 2019
StormDropRandom699,700,000ModerateExcellent20-word ARX generator derived from SHISHUA; author reports excellent PractRand performance and long periods.
XorShiftRandom593,700,000ModerateFairClassic 32-bit xorshift; known to fail portions of TestU01 and PractRand, acceptable for lightweight effects only. Marsaglia 2003
WyRandom448,600,000SlowVery GoodWyhash-based generator; published testing shows it clears BigCrush/PractRand with wide seed coverage. Wang Yi 2019
SquirrelRandom401,900,000SlowGoodHash-based generator built on Squirrel3; good equidistribution for table lookups but not extensively tested beyond moderate ranges. Squirrel Eiserloh
PhotonSpinRandom260,200,000Very SlowExcellentSHISHUA-inspired generator; independent testing (PractRand 128GB) by author indicates excellent distribution properties.
UnityRandom84,200,000Very SlowFairMirrors UnityEngine.Random (Xorshift196 + additive); suitable for legacy compatibility but not high-stakes simulation. Unity Random Internals
SystemRandom63,500,000Very SlowPoorThin wrapper over System.Random; inherits same LCG weaknesses and fails modern statistical batteries. System.Random considered harmful
DotNetRandom58,200,000Very SlowPoorLinear congruential generator (mod 2^31) with known correlation failures; unsuitable for high-quality simulations. System.Random considered harmful

Detailed Metrics

Random NextBool Next NextUint NextFloat NextDouble NextUint (Range) NextInt (Range)
LinearCongruentialGenerator796,900,000832,800,0001,309,300,000210,800,000408,400,000586,000,000502,500,000
WaveSplatRandom778,800,000792,200,0001,159,700,000204,400,000375,300,000515,100,000454,700,000
SplitMix64776,700,000751,900,0001,048,800,000210,200,000367,100,000479,400,000439,800,000
BlastCircuitRandom767,700,000704,200,0001,037,300,000207,800,000330,500,000468,300,000416,200,000
FlurryBurstRandom775,300,000642,400,000938,900,000210,500,000332,300,000446,500,000406,900,000
PcgRandom780,500,000656,800,000905,200,000205,900,000334,400,000450,400,000408,500,000
IllusionFlow778,400,000631,100,000882,600,000202,800,000320,100,000442,100,000391,700,000
RomuDuo773,500,000581,000,000757,300,000187,500,000251,600,000439,100,000376,300,000
XoroShiroRandom762,900,000584,600,000755,300,000186,000,000249,600,000420,200,000372,300,000
StormDropRandom754,700,000548,500,000699,700,000206,400,000248,700,000398,000,000353,200,000
XorShiftRandom771,000,000580,900,000593,700,000208,300,000246,400,000437,500,000380,900,000
WyRandom744,500,000384,500,000448,600,000181,800,000185,600,000288,100,000276,700,000
SquirrelRandom766,500,000388,600,000401,900,000192,500,000197,600,000355,700,000330,700,000
PhotonSpinRandom693,700,000247,300,000260,200,000129,200,000113,400,000212,200,000201,800,000
UnityRandom636,500,00082,000,00084,200,00063,500,00039,600,00078,900,00078,600,000
SystemRandom140,300,000145,000,00063,500,000129,300,000135,600,00058,500,00058,200,000
DotNetRandom538,000,00055,200,00058,200,00048,300,00027,600,00053,500,00054,100,000