Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

We're not talking about nanoseconds of real time; we're talking about nanoseconds as measured by the CPU doing the processing. Nanoseconds are not likely to be a uniform variate.


Yes and they are also not likely to be so non-uniform that more than 6.411 billion billion events all happen in one nanosecond.


Note it's not that number, but roughly the square root of that number, that matters.

And they might be quite non-uniform. If the scheduler tick and the nanosecond clock are synchronous, you could end up with a few thousand popular values instead of a billion.

It's not a real concern today, and probably won't be a real concern in 10 years, but it's not so far removed from possibility that no one has to think about it.


Good point about the square root of the random part. I guess that is why the 63 bit Snowflake ID uses a sequential counter.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: