Ongoing Optimisation with CppMem
I start with a small program and improve it successively. I verify each step of my process with CppMem. CppMem is an interactive tool for exploring the behaviour of small code snippets using the C++ memory model.
First, here is the small program.
The program is quite simple. It consists of the two threads thread1
and thread2
. thread1
writes the values x
and y
. thread2
reads the values x
and y
in the opposite sequence...