Poor performance on cluster multithreading

And I’m pretty sure I’ve pasted the link to this code before on a different thread (there’re already a dozen threads about this here…) Here is what I use to lazily initialize the RNG on each thread (it’s not using independent ones since I don’t really care about that for my current application and the code was written before the current randjmp is implemented). The lazy initialization avoid the 1s busy wait at initialization time on each thread as a side effect of @thread.

1 Like