Compiler Explorer
Godbolt is great for comparing compiler versions (and compilers).<p>For example, you can see gcc's progression of efficiency for c atomics with <a href="https://godbolt.org/z/brsoEr" rel="nofollow">https://godbolt.org/z/brsoEr</a>. If you increment the gcc version number, you will see the (very slow) mfence disappear, and xchg show up.<p>Then there is Clang at O3: If an int falls in the forest, and there is no one around, was it ever incremented? No. The function turns into a bare ret.