Hacker News new | ask | show | jobs
by dataflow 958 days ago
Yeah I don't understand it either. There's no dependency between the load and store, so there's no inherent ordering. The entire point of relaxed atomics is to let you reorder them freely - otherwise, why aren't you using acquire/release or such?
1 comments

My understanding is that actual hardware is stronger than C++11 relaxed atomic, but weaker than the revised memory model. The revised memory model closes some theoretical holes in C++11 (for example out-of-thin-air values that don't happen on actual hardware) so it is desirable for some people especially those trying to prove the correctness of compiler transformations, while others do not want to add additional overhead unless necessary. The question is whether there are programs and optimizations that care.