Subject: Re: [boost] [Fibers] Performance
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2014-01-14 06:10:48


2014/1/14 Antony Polukhin <antoshkka_at_[hidden]>

>
> How about comparing fiber construction and joining with thread construction
> and joining? This will help the users to decide, is it beneficial to start
> a new thread or to start a fiber.
>
> A few ideas for tests:
> * compare construction+join of a single thread and construction+join of
> single fiber (empty functors in both cases)
>

== compares the overhead of constructing between fiber and thread

> * 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.

fibers do *not* introduce parallelism, e.g. using fibers does not gain
benefits of multi-core systems
at the first glance.

Of course you could combine threads and fibers but this is not the focus of
boost.fiber this should be done
by another library.