4 ms·
> This algorithm doesn't work if you have multiple nodes Then what's the random part for? > Yes, this is what I meant by reserving some bits. What I'm saying
by Dylan16807 8y ago
> This algorithm doesn't work if you have multiple nodes
Then what's the random part for?
> Yes, this is what I meant by reserving some bits.
What I'm saying is, if you separate it out into an increment-field and a random-field, then you need a lot of bits and you need to fundamentally change how it works.
If you merely make sure your random number starts below some threshold, you only need 1 bit, or a small fraction of a bit. You would still increment the random number, but you wouldn't have to worry about hitting the max value if you always start between 0 and 2^79.9, for example.
- daveFNbuck 8y ago> Then what's the random part for? It's for multiple nodes, which is why this algorithm doesn't make any sense for their use case.