summaryrefslogtreecommitdiffhomepage
path: root/docs/crandom_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-06-19 20:31:22 +0200
committerTyge Løvset <[email protected]>2021-06-19 20:31:22 +0200
commit69fdd621d2bb57e7145f242e9facc996f76562bc (patch)
treeda222b093192735b123d08e0d27e8914b857fc86 /docs/crandom_api.md
parent3776efeb26088cde334eda8e8dcda66431a9a0cf (diff)
downloadSTC-modified-69fdd621d2bb57e7145f242e9facc996f76562bc.tar.gz
STC-modified-69fdd621d2bb57e7145f242e9facc996f76562bc.zip
Changed stc64. Similar to sfc64, but a different output functions and 320 bit state (256 mutable).
This is equally fast as the previous, but likely better quality because the 16-bit version is good, opposed to previous which failed PractRand.
Diffstat (limited to 'docs/crandom_api.md')
-rw-r--r--docs/crandom_api.md20
1 files changed, 11 insertions, 9 deletions
diff --git a/docs/crandom_api.md b/docs/crandom_api.md
index a943f7ea..4093204e 100644
--- a/docs/crandom_api.md
+++ b/docs/crandom_api.md
@@ -8,25 +8,27 @@ See [random](https://en.cppreference.com/w/cpp/header/random) for similar c++ fu
## Description
-**stc64** is a novel, extremely fast PRNG by Tyge Løvset, suited for parallel usage. It features a
-Weyl-sequence as part of the state. In general testing, **stc64** is the fastest among *pcg64*,
-*xoshiro256`**`*, *sfc64*, and *lehmer64*.
+**stc64** is a novel, extremely fast PRNG by Tyge Løvset, suited for parallel usage. It features
+Weyl-sequences as part of its state. It is inspired on *sfc64*, but has a different output function
+and state size.
-*wyrand* is faster on platforms with fast 128-bit multiplication, and has 2^64 period length
-(https://github.com/lemire/SwiftWyhash/issues/10). However, *wyrand* is not suited for massive
+**sfc64** is the fastest among *pcg*, *xoshiro`**`*, and *lehmer*. It is equally fast as *sfc64* on
+most platforms. *wyrand* is faster on platforms with fast 128-bit multiplication, and has 2^64 period
+length (https://github.com/lemire/SwiftWyhash/issues/10). However, *wyrand* is not suited for massive
parallel usage due to its limited total minimal period length.
-**stc64** does not require multiplication or 128-bit integer operations. It has 256 bit state,
-but updates only 192 bit per generated number.
+**stc64** does not require multiplication or 128-bit integer operations. It has 320 bit state,
+but updates only 256 bit per generated number.
-There is no *jump function*, but each odd number Weyl-increment (state[3]) starts a new
+There is no *jump function*, but each odd number Weyl-increment (state[4]) starts a new
unique 2^64 *minimum* length period. For a single thread, a minimum period of 2^127 is generated
when the Weyl-increment is incremented by 2 every 2^64 output.
**stc64** passes *PractRand* (tested up to 8TB output), Vigna's Hamming weight test, and simple
correlation tests, i.e. *n* interleaved streams with only one-bit differences in initial state.
+Also 32-bit and 16-bit versions passes PractRand up to their size limits.
-For more, see the PRNG shootout by Vigna: http://prng.di.unimi.it and the debate between the authors of
+For more, see the PRNG shootout by Vigna: http://prng.di.unimi.it and a debate between the authors of
xoshiro and pcg (Vigna/O'Neill) PRNGs: https://www.pcg-random.org/posts/on-vignas-pcg-critique.html
## Header file