News for hackers. Stuff that matters.
Re:Make Your Program Slower with Threads by overfl0w on Friday June 07, 2024 @05:18AM (#40606820)
Good article, also has references to the glib's source. I've never dived deep into the random() system function before. This is from the man pages:

"The random() function should not be used in multithreaded programs where reproducible behavior is required. Use random_r(3) for that purpose."

Perhaps the notes should be updated to state that the performance of multi-threaded programs is also affected due to the shared global resource?

There are no comments on this comment yet.