Re:Make Your Program Slower with Threads
by loeg on Thursday June 06, 2024 @09:15PM
(#40604348)
You can't seed each thread with the same value -- that's all you're saying, right?
[ Parent
| on HN ]
Result distribution (like averaging to zero) only happens at scale. Even if you use a different seed every time you might not see the proper distribution when looking across different generator instances.
If you're running into contention with multiple threads on a shared PRNG, you're probably at sufficient scale.
Sure. Just saying that, for example, if you spawn threads and use the thread ID as the seed but pull a single value per thread, that's not sufficient.