$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Removing auto_ptr/etc. from Boost
From: Peter Dimov (lists_at_[hidden])
Date: 2015-03-19 16:43:58
Andrey Semashev wrote:
> I was looking at random_device. Now that I look at other generators, they
> don't use it, so my worries are probably unfounded.
random_device is overkill here. You can get a reasonably random seed by,
f.ex. rand() + ( rand() << 15 ), and then create a local RNG from it.
The Boost.Random page listing the generators says that taus88 is 6 times
faster than minstd_rand, which is the usual implementation of rand(). And it
has only three words of state, so constructing it can't be expensive.