Skip to content

Commit 0562111

Browse files
authored
Merge pull request #5011 from WebDrake/mir-mt-update
Rework MersenneTwisterEngine using Ilya Yaroshenko's faster algorithm
2 parents 09d97ad + 36f1ec3 commit 0562111

File tree

2 files changed

+266
-88
lines changed

2 files changed

+266
-88
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
`MersenneTwisterEngine` has been updated so that its template signature
2+
matches the C++11 standard (adding two new template parameters, an extra
3+
tempering parameter `d` and the initialization multiplier `f`).
4+
5+
For anyone using the standard template instantiation `Mt19937` this will
6+
have no noticeable effect. However, this will be a breaking change for
7+
anyone using the `MersenneTwisterEngine` template directly.
8+
9+
The internal implementation has been reworked to use Ilya Yaroshenko's
10+
highly optimized algorithm from `mir.random`. This should have a very
11+
noticeable positive effect for anyone who cares about generating a lot
12+
of random numbers quickly.
13+
14+
A new `Mt19937_64` template instantiation has been added, corresponding
15+
to the standard 64-bit implementation of the algorithm (MT19937-64).
16+
This fixes $(LINK https://issues.dlang.org/show_bug.cgi?id=10900).

0 commit comments

Comments
 (0)