roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

Create micro-benchmarks for core::Semaphore

Open gavv opened this issue 4 years ago • 2 comments

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.

gavv avatar May 24 '20 12:05 gavv

Can I get this?

pranjii avatar Oct 13 '21 08:10 pranjii

@pranjii Sure!

gavv avatar Oct 14 '21 14:10 gavv