[Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Jan 7 18:51:51 PST 2017


On 1/7/17 6:16 PM, Joseph Rushton Wakeling wrote:
>
> The method I developed works fine with LDC, but fails with DMD: the
> internal state of the generator winds up as all zeros, except for the
> `State.z` parameter which mysteriously ends up at the correct value.
> This would suggest that somehow the generated state is being overwritten
> _after_ being correctly generated, rather than not correctly generated
> in the first place.
>
> Any chance that someone with more CTFE-fu than myself could take a
> glance and advise what might be wrong (or how to work around it)?

This indicates a compiler bug in dmd itself, so the best outcome for 
this library work would be a reduced compiler bug + a simple library 
workaround. -- Andrei


More information about the Digitalmars-d mailing list