i am using gcc 4.4.6 and atomics can be accessed by #include <cstdatomic>
. After using them, i realized they are very very slow. Finally i came across a post on stackoverflow, which describes it here Why is std::atomic<bool> much slower than volatile bool?
But i am not able to follow it. Can someone please help me understand that post or explain why atomics in gcc4.4.6 are so slow?