Boost logo

Boost :

Subject: Re: [boost] Boost.Uuid and header-only support
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2017-11-05 13:17:27

On 11/05/17 16:00, Peter Dimov via Boost wrote:
> James E. King, III wrote:
>> In other words, the existing implementation may be optimal using a PRNG.
> This depends on your definition of optimality. If speed is more
> important than not having UUID collisions, sure, it's optimal.

Mersenne twister has a very long period - probably longer than any given
application can reasonably run to generate UUIDs, let alone a single
random_generator instance. To eliminate even the slightest possibility
of UUID collisions, you can re-seed the Mersenne twister PRNG periodically.

And performance of generating UUIDs can be significant in some
circumstances. UUIDs are typically used as various resource identifiers
(think sessions, users, etc.), so poor performance can limit the rate of
allocation of such resources.

Boost list run by bdawes at, gregod at, cpdaniel at, john at