Skip to content

Add sirius64 generator - #31

Merged
lemire merged 3 commits into
masterfrom
sirius64
Sep 21, 2026
Merged

lemire merged 3 commits into
masterfrom
sirius64

Conversation

@lemire

@lemire lemire commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Closes #30.

Adds Sirius64 by Matteo Zapparoli (Apache-2.0): a 64-bit state, 64-bit output PRNG. The state is a Weyl sequence with the golden-ratio increment (same as splitmix64) and the output function is a multiply-xorshift-rotate mix:

uint64_t z = (*s += 0x9e3779b97f4a7c15);
z = 0x9e3779b97f4a7c15 * (z ^ (z >> 17));
z = (z << 32) | (z >> 32);
return 0x9e3779b97f4a7c15 * ((*s) ^ z ^ (z >> 17));

Changes

  • source/sirius64.h — generator, following the wyrand.h/w1rand.h pattern (sirius64_seed, sirius64, sirius64_stateless, sirius64_cast32). Verified bit-for-bit against the upstream reference over 1M outputs for several seeds.
  • practrand/src/testsirius64.c, testu01/src/testsirius64.c — harnesses (with -H support).
  • Registered in speed/src/rng.cpp, practrand/CMakeLists.txt, testu01/CMakeLists.txt, entropy/CMakeLists.txt, practrand/runtests.sh, testu01/testlist.sh.
  • README: added to the list of contenders.

Results so far (Apple Silicon, arm64)

Speed (./build/speed/rng, no perf counters):

splitmix64   :   0.11 ns/byte   8.97 GB/s
wyrand       :   0.11 ns/byte   8.78 GB/s
sirius64     :   0.11 ns/byte   8.98 GB/s

TestU01 SmallCrush: all tests passed for lsb, msb (-H), bit-reversed (-z) and byte-reversed msb (-r -H).

PractRand 0.93: clean through 8 GB on both lsb and msb (only "unusual" p-values). Full 512 GB runs and BigCrush (lsb and msb) are in progress; I'll push the logs to practrand/results/ and testu01/results/ when they finish.

Adds the Sirius64 PRNG by Matteo Zapparoli (https://github.com/matteo65/Sirius64,
Apache-2.0): 64-bit state, 64-bit output, golden-ratio Weyl sequence with a
multiply-xorshift-rotate output function.

Registered in the speed benchmark, the PractRand and TestU01 harnesses, the
entropy harness, and the run scripts.
@lemire

lemire commented Sep 21, 2026

Copy link
Copy Markdown
Owner Author

PractRand 0.93 at 512 GB: both lsb (testsirius64) and msb (testsirius64 -H) pass with no FAIL or suspicious results, only a handful of "unusual" p-values. Logs pushed to practrand/results/. Added a row to the visual summary; TestU01 column left blank pending BigCrush (running).

@lemire

lemire commented Sep 21, 2026

Copy link
Copy Markdown
Owner Author

TestU01 BigCrush (default seed, default bit order), ~66 min CPU each:

  • testsirius64 -b (lsb 32 bits): 159/160 statistics in range; one marginal p-value, CouponCollector, r = 27 at 8.4e-4. This is the same kind of lone borderline value that shows up in the stored splitmix64/pcg64/aesctr logs, not a failure.
  • testsirius64 -H -b (msb 32 bits): all tests were passed.

Logs pushed to testu01/results/. I marked the TestU01 column as passing in the visual summary, but note that only 2 of the 24 configurations run by bigcrush.sh (4 seeds × 3 bit orders × lsb/msb) were run here; the remaining ones would take about a day of CPU.

@lemire
lemire merged commit e7e25a6 into master Sep 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sirius64: a new and promising PRNG

1 participant