multiprocessing.Value can be used to create a counter that works across processes and is decently performant. This repository is an attempt to measure it.
- Create a process pool
- Initialize it by running some computationally light load
- Run more light load until the system (processor clock speed etc.) 'adapts' to the this load.
- Run more light load and time them to see the pool overhead.
- Run the actual counter function, time it internally and externally
- Calculate speed factor differences