Boost logo

Boost :

Subject: Re: [boost] [Fibers] Performance
From: Nat Goodspeed (nat_at_[hidden])
Date: 2014-01-15 16:31:20


On Wed, Jan 15, 2014 at 4:02 PM, Hartmut Kaiser
<hartmut.kaiser_at_[hidden]> wrote:

> IMHO, Boost.Fiber is a library which - unlike other Boost libraries - has
> not been developed as a prototype for a particular API (in which case I'd be
> all for accepting subpar performance). It clearly has been developed to
> provide a higher performing implementation for an existing API. That means
> that if Oliver is not able to demonstrate superior performance over existing
> implementations, I wouldn't see any point in having the library in Boost in
> the first place.

Strongly disagree with your assumption. To me it's the semantics of
Boost.Fiber that matter.

Before launching any code on a new thread, both Boost.Thread and
std::thread require that you must sanitize that code against potential
race conditions. With a large, ancient code base, that sanitizing
effort becomes almost prohibitive. Running one thread with multiple
fibers is guaranteed to introduce no new race conditions.

Emulating the std::thread API is intended to minimize coder confusion
-- not to provide a drop-in replacement.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk