2
0
mirror of https://github.com/boostorg/atomic.git synced 2026-01-24 17:52:10 +00:00
Files
atomic/doc
Andrey Semashev 559eba81af Use dummy atomic instruction instead of mfence for seq_cst fences on x86.
mfence is more expensive on most recent CPUs than a lock-prefixed instruction
on a dummy location, while the latter is sufficient to implement sequential
consistency on x86. Some performance test results are available here:

https://shipilev.net/blog/2014/on-the-fence-with-dependencies/

Also, for seq_cst stores in gcc_atomic backend, use an xchg instead of
mov+mfence, which are generated by gcc versions older than 10.1.

The machinery to detect mfence presence is still left intact just in case
if we need to use this instruction in the future.

Closes https://github.com/boostorg/atomic/issues/36.
2020-06-11 22:32:01 +03:00
..
2014-01-19 18:13:36 +04:00
2014-01-19 18:13:36 +04:00
2012-12-18 09:43:23 +00:00