Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Micro-benchmark for waking condvar on which no-one is waiting
This patch adds to tst-condvar two benchmark for measuring condvar::wake_all() on a condvar that nobody is waiting on. The first benchmark does these wakes from a single thread, measuring 26ns before commit 3509b19, and only 3ns after it. The second benchmark does wake_all() loops from two threads on two different CPUs. Before the aforementioned commit, this frequently involved a contented mutex and context switches, with as much as 30,000 ns delay. After that commit, this benchmark measures 3ns, the same as the single-threaded benchmark.
- Loading branch information