
2014/1/14 Oliver Kowalke
2014/1/14 Antony Polukhin
* compare construction+join of a multiple threads and construction+join of multiple fibers (empty functors in both cases) * compare construction of a thread and construction of fiber (empty functors in both cases)
I believe this is not a valid, because you compare the execution-time of N fibers running the test-function (concurrent but not parallel) in *one* thread with the execution-time of N threads (running parallel) while each single thread runs the test-function once.
Not exactly. Test function is *empty*, so you'll see the influence of *additional* fiber/thread (overhead change beacuse of already spawned fibers/threads). In other words: Threads require synchronizations and OS context switches. With growth of threads those overheads may grow. Fibers must be free from such effects, however they can be less CPU cache friendly (in theory). -- Best regards, Antony Polukhin