roc-toolkit
roc-toolkit copied to clipboard
Create micro-benchmarks for core::Semaphore
Last revised: Oct 2023
It would be useful to measure Semaphore construction, destruction, post() when there are no waiters, post() when there are waiters, and non-blocking wait() (i.e. after post).
The numbers on Linux/Glibc are quite predictable (something compared to unlocked mutex without waiters, i.e. a few nanoseconds, and a minimum syscall overhead when there are waiters, i.e. a few hundred nanoseconds).
However, it would be interesting to get these numbers on uclibc (Linux), bionic (Android), and macOS (where core::Semaphore is implemented using kernel semaphores).
See #366 for details on adding micro-benchmarks.
Can I get this?
@pranjii Sure!