Open 54aefcd4-c07d-4252-8441-723563c8826f opened 6 years ago
@davidtgoldblatt spotted this in jemalloc's fast path (https://github.com/jemalloc/jemalloc/pull/1195#issuecomment-385575409) where it appears to produce a slightly measurable performance regression.
Extended Description
The following C++ code compiled with clang
-O3 -std=c++17
(https://godbolt.org/g/CAMK9k):produces different code for the atomic and non-atomic functions, but in this particular case, it should probably be the same and emit a cmpb instruction on both (right? I am not 100% sure):