Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C11/C++11 weak memory benchmarks

Can anyone point to benchmark results comparing performance of C11/C++11 code using relaxed atomic operations (particularly memory_order_release and memory_order_acquire, but also memory_order_consume and memory_order_relaxed) versus the default memory_order_seq_cst? All architectures are of interest. Thanks in advance.

like image 282
user2949652 Avatar asked Nov 03 '13 11:11

user2949652


1 Answers

I did a bit of benchmarking on ARMv7, see https://github.com/reinhrst/ARMBarriers for the report, the slides for my talk at EuroLLVM, and the seqlock code I used.

Short story: in the seqlock code, the Acquire/Release function was about 40% faster than the sequentially consistent version. enter image description here

like image 93
Claude Avatar answered Nov 18 '22 06:11

Claude