|
Boost : |
Subject: [boost] [random] Request for Additional Generators
From: degski (degski_at_[hidden])
Date: 2017-06-14 06:30:01
I would like to request the addition of 2 generators to Boost.Random.
xoroshiro128+
<http://xoroshiro.di.unimi.it/xoroshiro128plus.c>
Web page: http://xoroshiro.di.unimi.it/
A very fast PRNG, (quite a lot) faster than the fastest current boost
generator, with a period of 2 ^ 128, which could/would be good for f.e.
game programming (except for shuffling, see below). It also has a state of
only 16 bytes on x64. The author states that the distribution is of higher
quality than f.e. MT19937-64
<http://www.math.sci.hiroshima-u.ac.jp/%7Em-mat/MT/VERSIONS/C-LANG/mt19937-64.c>.
It's probably best to just read the web-page, as it goes into quite some
detail and is in itself the summary of the research conducted in this area.
Other than the normal boost complications, it's very easy to implement and
I use my simplistic implementation to great satisfaction with the std and
boost distributions.
In this
<https://www.codeproject.com/Tips/1083372/Random-Number-Generator-Recommendations-for-Applic?msg=5402443#xx5402443xx>
article on CodeProject the issue of shuffling is raised. It's appears that
shuffling of large arrays of data requires a generator with extremely long
periods in order to be able to generate all the possible permutations. To
this extent I would like to see in boost a generator like George
Marsaglia's SuperKiss
<https://groups.google.com/forum/#!topic/comp.lang.fortran/QiTrbq0XeyM>
or/and a templated SFMT generator like this
<https://sourceforge.net/p/int64/svn/HEAD/tree/snips/sfmt.hpp> one.
degski
-- "*Ihre sogenannte Religion wirkt bloà wie ein Opiat reizend, betäubend, Schmerzen aus Schwäche stillend.*" - Novalis 1798
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk