Boost logo

Boost :

Subject: [boost] [random] new threefry random engine
From: Thijs van den Berg (thijs_at_[hidden])
Date: 2014-04-17 18:19:24

Hi all,

I've completed a nice new random engine that I would like to propose for addition to boost/random.

The engine is called "threefry" and it's based on the paper "Parallel random numbers: as easy as 1, 2, 3" by Salmon, John K. and Moraes, Mark A. and Dror, Ron O. and Shaw, David E.

I've been using it myself a lot for the last couple of years, and now I've rewritten it so that it will fit in the boost random framework and adhere to the concepts. It has some really nice properties, in particular for large scale parallel computing:
* High quality randomness (according to the BigCrush tests) with a cycle length of 2^258
* Fast (comparable to Mersenne Twister) & little memory usage (13x 64 bit integers)
* O(1) discard and guarantees for non-overlapping sequences when the (up to 256 bit) seeds are unequal

I've uploaded the code, description and tests to
The actual engine is at

I would really appreciate any feedback about the idea for inclusion and of course comments about the quality of the code,tests,docs
kind regards,

Sitmo Consultancy B.V.
Financial Modelling & Data Science
+ 31 6 24110061
P.O. Box 1059, 2600BB, Delft, The Netherlands

Boost list run by bdawes at, gregod at, cpdaniel at, john at