- Test:
- investigate performance of N-fold thread synchronisation.
- use the multithreaded Microbenchmark
- use an array of consecutively used barriers, one for each per-thread repetition
- test function is parametrised for comparison of different barrier implementations
- Warning
- for actually be useful, this test should be compiled with
-O3
and be invoked stand-alone several times, while otherwise system load is low
- See also
- lib::SyncBarrier
-
steam::control::DispatcherLoop
Definition at line 100 of file sync-barrier-performance-test.cpp.
|
template<class BAR , size_t nThreads> |
double | performanceTest () |
|
virtual void | run (Arg) |
|
|
virtual void | run (Arg arg)=0 |
|
◆ run()
- Test:
- performance investigation of N-fold synchronisation barrier
- Note
- what we are measuring here is actually the time to catch up for all threads involved, implying we are observing the operational delay introduced by synchronisation, and not an overhead of the implementation technique as such. However — the classical implementation based on Mutex + ConditionVar, which enters a thread sleep state on wait, is slower by orders of magnitude.
Definition at line 146 of file sync-barrier-performance-test.cpp.
The documentation for this class was generated from the following file: