Mir Random [WIP]

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 23 06:30:53 PST 2016


On 11/23/2016 09:12 AM, Kagamin wrote:
> xorshift128+ returns a temporary value computed during state update, so
> it can't efficiently separate font from popFront.

That seems to be a minor matter. Of course at best some measurements 
would be in order.

> Also this API is prone
> to reuse some values and discard others, call popFront after front.

This claim would apply to all ranges. There seems to be evidence it is 
unfounded.

The main argument for using the range interface for RNGs is reuse of 
abstraction. Minute implementation matters are much less important. The 
main counter-argument is that the abstraction is not fitting well and 
another abstraction (such as opCall) is more advantageous.


Andrei



More information about the Digitalmars-d mailing list