Quantcast
Channel: Relative performance of std::atomic and std::mutex - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Peter Cordes for Relative performance of std::atomic and std::mutex

What hardware are you testing on?Since you're using GCC, the std::atomic seq_cst store will be using a mov+ slow mfence instead of a somewhat less slow xchg-with-mem (which is also a full barrier, like...

View Article



Answer by abc for Relative performance of std::atomic and std::mutex

I was told, on some implementations of mutex initially it will spin lock internally first.This could be why it seems faster.If a system call would be made I doubt you would have the same results.(I...

View Article

Relative performance of std::atomic and std::mutex

I am considering options for implementation of a queue for a project, a requirement of which is that the producer, at least, must be as low latency as possibe. To this end, I have been investigating...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images