Microbenchmark: libfiber vs pthreads
Write two programs, one using pthreads, the other using libfiber. They should each create two threads/fibers that keep incrementing a thread-local (or fiber-local) value until killed. When killed after a fixed amount of time, we check which pair (threads or fibers) could increment their average values further.
Our goal is to compare the overhead of maintaining a fiber-local counter to the cost of passing through the kernel for each context switch. The kernel threads must thus be pinned to run on the same CPU.
For the same reason, we must also not have any cases where only one thread/fiber runs (this might give higher average numbers, but it doesn't tell us anything about the costs).