Boost logo

Boost :

Subject: Re: [boost] [Fibers] Performance
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-01-15 06:36:06

On 14 Jan 2014 at 12:42, Hartmut Kaiser wrote:

> > I did a quick hack and the code using fibers is 2-3 times faster than the
> > threads.
> > boost.fiber does not contain the suggested optimizations (like replacing
> > stl containers)
> I'd be disappointed if the overheads imposed by Boost.Fiber are only 2-3
> times smaller than for kernel threads. I'd expect it to impose at least 10
> times, if not 15-20 times less overheads than kernel threads (at least
> that's the numbers we're seeing from HPX).

Like any C++ probably Boost.Fiber makes many malloc calls per context
switch. It adds up. If I ever had a willing employer, I could get
clang to spit out far more malloc optimal C++ at the cost of a new
ABI, but I never could get an employer to bite.

I think coming within 50% of the performance of Windows Fibers would
be more than plenty. After all Boost.Fiber "does more" than Windows


Currently unemployed and looking for work.
Work Portfolio:

Boost list run by bdawes at, gregod at, cpdaniel at, john at