Summary: Xorshift as default generator
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from 2011-09-02 03:11:35 PDT ---
In the std.random module I suggest to use Xorshift as default generator (the
one used when a generator is not specified, like in uniform(0,5)).

Two or three times I have had to hunt for performance problems in D code, and
in the end the cause was the high-quality but slow Mersenne Twister used on
default. Replacing it with the Xorshift has solved my problems, because it is
significantly faster. And the quality of numbers generated by Xorshift was
enough for all my purposes, it's better than the linear congruences generator.

The disadvantage of using Xorshift on default is that where you need really
high quality random numbers, the default is not enough any more. But I think
such situations are not common. If in your code you need very high quality
random numbers, then I think you know it, and you know to use the Mersenne
Twister (or even better).

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to