News for hackers. Stuff that matters.
Re:Nanosecond timestamp collisions are common by darkclouds on Friday July 21, 2023 @03:58AM (#36811222)
> This is why you should use ids that combine both a time component and a sequence.

Computers should run like clockwork, so in this example of using all the cores, in Windows and likely some other OS's, threads are assigned to cores when they are started and you can have many threads per core, ergo the time component should also have the thread and the core number combined with it with multi core systems.

Its possible to write the code in such a way some variables are bounced out of the cpu cache back to memory to avoid any caching issues because I think the cache on some cpu's are per core, and some are per cpu.

Re:Nanosecond timestamp collisions are common by Joker_vD on Friday July 21, 2023 @04:50AM (#36811565)
> threads are assigned to cores when they are started

Do they? I thought the normal behaviour was for cores to pick any available thread to run, so core migration is quite normal.

> ergo the time component should also have the thread and the core number combined with it with multi core systems.

Sorry, how exactly does it follow from the previous? You seem to have omitted the other half of your syllogism. After all, clockworks do not have thread nor core numbers so I don't quite see how having those in UUIDs will make computers run like clockwork.

Re:Nanosecond timestamp collisions are common by darkclouds on Saturday July 22, 2023 @02:26AM (#36823832)
>> threads are assigned to cores when they are started

>Do they? I thought the normal behaviour was for cores to pick any available thread to run, so core migration is quite normal.

The CPU and its cores know very little about threads, threads are a figment of the OS.

>Sorry, how exactly does it follow from the previous? You seem to have omitted the other half of your syllogism

Syllogism would perhaps be a intuitive word to use, why is this? What happened to you?