Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost.asio] Concurrently Ping 1000+ Hosts
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2013-12-20 11:37:33


On 20 Dec 2013 at 8:16, Nat Goodspeed wrote:

> >> Glad you find it interesting, and I hope AFIO's unusual API design
> >> doesn't put you off. I have some real world benchmarks for AFIO at
> >
> > I think that this is likely going to be the major obstacle for the
> > adoption of AFIO. Have you consider adding some kind of convenience
> > API that is easier to use for the casual user, but also more limited
> > in functionality?
>
> AFIO + Fiber :-)
> (no constraint on functionality)

I think that's a very real possibility. I think for more complex use
cases the multiple nested callback design is probably unavoidable,
but there is a huge middle ground there where callbacks are overkill
and fibers might just be the ticket.

I also worry about performance with fibers - I can see them using up
a lot of L1 cache because you can't avoid copy semantics with them as
they dump and reload context. Callbacks encourage you to use a
pointer to a state object, and already one of the biggest performance
drains in AFIO is the parameter packing/unpacking overhead of
std::function<> and std::bind<> because it uses up precious cache
space.

Anyway, very much looking forward to seeing what fibers can do for
AFIO.

Niall

-- 
Currently unemployed and looking for work.
Work Portfolio: http://careers.stackoverflow.com/nialldouglas/



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net