Re:No sane compiler would optimize atomics (2015)
by voidnullnil on Sunday July 11, 2021 @06:05PM
(#27804836)
So what's the motivation for the article? Presumably someone complained that the compiler optimizing atomics broke their code.
[ Parent
| on HN ]
Re:No sane compiler would optimize atomics (2015)
by chrisseaton on Sunday July 11, 2021 @06:13PM
(#27804895)
If they need some interleaving to happen at least n% of the time for their program to work... what am I supposed to do? Because it was never guaranteed to be interleaved at least n% of the time, even when the atomics were not merged. Do they want me to bypass the system scheduler and run threads concurrently with forced interleavings against a statistical distribution? I doubt they want that. So what do they want?