From: Andy (atompkins_at_[hidden])
Date: 2007-06-01 16:59:39
"Peter Dimov" <pdimov_at_[hidden]> wrote in
> Dave Jenkins wrote:
>> You did a nice job speeding up the uuid::create(engine) function to
>> 0.4 seconds for 1 million UUIDs. But now the uuid::create() function
>> is extremely slow - 131 seconds for 1 million UUIDs (source code
> The requirement for uuid::create to be fast conflicts with the
> requirement that it needs to create a "universally unique identifier",
> that is, a high-quality random number. Typically, high-quality
> randomness is more important than performance, as one rarely needs to
> create one million UUIDs. One could argue that the high-performance
> case is adequately addressed by the engine-taking overload.
>> Can you change it to use a static mt19937 engine?
> This introduces thread safety issues.
> All that said, the current uuid::create throws away most of the
> randomness produced by the random digest helper function and uses only
> 32 bits of it as a seed, so it's not really high quality. :-)
I will look into using all of the randomness produced by the random
digest helper function. I did look at the function
mersenne_twister::seed(It& first, It last), but couldn't get it to work.
I take another shot at it.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk