New Lagged Fib. PRNG gen and random2.d

monarch_dodra monarchdodra at gmail.com
Mon Aug 26 02:47:49 PDT 2013


On Monday, 26 August 2013 at 09:37:11 UTC, Joseph Rushton 
Wakeling wrote:
> On 26/08/13 11:24, monarch_dodra wrote:
>> However, it can *also* generate ulongs with 64 bits of 
>> randomness, but doing so
>> only takes roughly 40% more time. Which is great? I'd have to 
>> bench on a linux
>> 64 with a dmd64 compiler: I think a true 64 bit implementation 
>> should have even
>> less overhead, making LF *faster* (!) than MinstdRand0.
>
> I'll try and benchmark that myself.  Boost also defines a 
> 64-bit Mersenne Twister which we really should have in Phobos; 
> it'll require some tweaks to the MersenneTwisterEngine design 
> (some more template parameters).

FYI, I tweaked my algo a bit, as the benches revealed an issue. 
Please wait for a new commit before testing my code.


More information about the Digitalmars-d mailing list