Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2023-11-30 00:03:04


Niall Douglas wrote:
> On 29/11/2023 22:21, Peter Dimov via Boost wrote:
> > Niall Douglas wrote:
> >> There were still some big design mistakes in 11 - I still find
> >> `<random>` very unfortunate and entirely avoidable at the time,
> >
> > <random> is mostly fine. The generators and the concepts reflect
> > the state of the art as it was then, and aren't entirely broken even
> > today.
>
> I really have to disagree :)
>
> There is this axis randomness:
>
> 1. Predictable randomness from a specified starting state.
>
> 2. Unpredictable randomness with same semantics on all architectures.
>
> There is also the quality vs fast axis.
>
> On the quality vs fast axis, I could just about agree with you about
> <random>.
>
> On that other axis though, <random> is a complete design failure. One
> needs the ability to copy states, serialise and deserialise states, and
> to get identical output on all architectures and platforms for a given
> starting state.
>
> One also must not have an engine perform 20x worse on one platform than
> another if one is to write usefully portable code.

I don't understand your objections, sorry.

Are you saying that the generators in <random> don't offer the ability
to copy, serialize, deserialize and give identical output? Because they do.

Which engine performs 20x worse?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk