Hacker News new | ask | show | jobs
by glodalitazic 1066 days ago
Iirc you dont want to spend entropy that you don't need. The advantage of using the time means you need to spend less bits on expensive randomness and thus generation is cheaper.
2 comments

I only work in embedded, so I’m not sure about fancy computers - but when we make UUIDv7s, I am certain the random is faster than pulling the time, formatting for milliseconds, then storing in position.
PRNGs are cheap to compute, and 'random' enough.