Update docs and performance

This commit is contained in:
Matt Borland
2025-01-30 16:19:59 -05:00
parent 963d75cf55
commit 111abda38c
3 changed files with 14 additions and 0 deletions
+3
View File
@@ -42,3 +42,6 @@
[template xoshiro512pp_speed[] 133%]
[template xoshiro512d_speed[] 144%]
[template xoshiro512mm_speed[] 113%]
[template xoshiro128pp_speed[] 133%]
[template xoshiro128f_speed[] 145%]
[template xoshiro128mm_speed[] 116%]
+8
View File
@@ -90,6 +90,10 @@ numbers mean faster random number generation.
[[__xoshiro512pp] [2[sup 512] [`8*sizeof(uint64_t)`] [[xoshiro512pp_speed]] [[xoshiro512++ from https://prng.di.unimi.it]]
[[__xoshiro512d] [2[sup 512] [`8*sizeof(uint64_t)`] [[xoshiro512d_speed]] [[This generator returns doubles instead of uint64_t. It is modified xoshiro512+ from https://prng.di.unimi.it]]
[[__xoshiro512mm] [2[sup 512] [`8*sizeof(uint64_t)`] [[xoshiro512mm_speed]] [[xoshiro512** from https://prng.di.unimi.it]]
[[__xoshiro128pp] [2[sup 128] [`4*sizeof(uint32_t)`] [[xoshiro128pp_speed]] [[xoshiro128++ from https://prng.di.unimi.it. Returns uint32_t]]
[[__xoshiro128d] [2[sup 128] [`4*sizeof(uint32_t)`] [[xoshiro128d_speed]] [[This generator returns float instead of uint32_t. It is modified xoshiro128+ from https://prng.di.unimi.it]]
[[__xoshiro128mm] [2[sup 128] [`4*sizeof(uint32_t)`] [[xoshiro128mm_speed]] [[xoshiro128** from https://prng.di.unimi.it. Returns uint32_t]]
]
As observable from the table, there is generally a quality/performance/memory
@@ -104,6 +108,10 @@ If the names of the generators don't ring any bell and you have no idea
which generator to use, it is reasonable to employ __xoshiro256pp for a start: It
is fast and of high quality.
If you need a 32-bit return instead of 64-bit prefer __xoshiro128pp.
If you need either double or float as the return type prefer __xoshiro256d or __xoshiro128f respectively.
[note These random number generators are not intended for use in applications
where non-deterministic random numbers are required. See __random_device
for a choice of (hopefully) non-deterministic random number generators.]
+3
View File
@@ -388,6 +388,9 @@ int main(int argc, char*argv[])
run(iter, "xoshiro512pp", boost::random::xoshiro512pp());
run(iter, "xoshiro512d", boost::random::xoshiro512d());
run(iter, "xoshiro512mm", boost::random::xoshiro512mm());
run(iter, "xoshiro128pp", boost::random::xoshiro128pp());
run(iter, "xoshiro128f", boost::random::xoshiro128f());
run(iter, "xoshiro128mm", boost::random::xoshiro128mm());
#ifdef HAVE_MT19937INT_C
// requires the original mt19937int.c